{"action":"opened","issue":{"url":"https://api.github.com/repos/ruby-grape/grape/issues/1435","repository_url":"https://api.github.com/repos/ruby-grape/grape","labels_url":"https://api.github.com/repos/ruby-grape/grape/issues/1435/labels{/name}","comments_url":"https://api.github.com/repos/ruby-grape/grape/issues/1435/comments","events_url":"https://api.github.com/repos/ruby-grape/grape/issues/1435/events","html_url":"https://github.com/ruby-grape/grape/issues/1435","id":163862689,"number":1435,"title":"Files becomes a String","user":{"login":"Extazystas","id":2153311,"avatar_url":"https://avatars.githubusercontent.com/u/2153311?v=3","gravatar_id":"","url":"https://api.github.com/users/Extazystas","html_url":"https://github.com/Extazystas","followers_url":"https://api.github.com/users/Extazystas/followers","following_url":"https://api.github.com/users/Extazystas/following{/other_user}","gists_url":"https://api.github.com/users/Extazystas/gists{/gist_id}","starred_url":"https://api.github.com/users/Extazystas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Extazystas/subscriptions","organizations_url":"https://api.github.com/users/Extazystas/orgs","repos_url":"https://api.github.com/users/Extazystas/repos","events_url":"https://api.github.com/users/Extazystas/events{/privacy}","received_events_url":"https://api.github.com/users/Extazystas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-05T14:21:17Z","updated_at":"2016-07-05T14:21:17Z","closed_at":null,"body":"Hello. I'm sending file to Grape API with this code:\r\n```\r\nFaraday.new(endpoint) do |conn|\r\n        conn.response :logger unless Rails.env.test?\r\n        conn.response :json, content_type: /\\bjson$/ unless response_type != :json\r\n        conn.request :multipart\r\n        conn.request :url_encoded\r\n        conn.adapter :net_http\r\nend\r\n```\r\nI'm setting file for connection this way:\r\n```\r\n...\r\nFaraday::UploadIO.new(\r\n          file.tempfile.path,\r\n          file.content_type,\r\n          file.original_filename\r\n        )\r\n...\r\n```\r\nAnd it works because I can see this object in params before sending a request:\r\n```\r\n#<UploadIO:0x007f87ac578d58 @content_type=\"image/jpeg\", @original_filename=\"sQF5wS0qaV8.jpg\", @local_path=\"/tmp/RackMultipart20160705-8019-18ryl1x.jpg\", @io=#<File:/tmp/RackMultipart20160705-8019-18ryl1x.jpg>, @opts={}>\r\n```\r\nBut on a client incoming params does not contain a File, its a plain string like that:\r\n`\"#<UploadIO:0x007f87ac578d58>\"`\r\n\r\nI tried to debug grape from `Endpoint#run` method but `@params` already has a String instead of File here. I can successfully upload file with Swagger, but not with Faraday. \r\nAny ideas why its happening? "}}
{"actor":{"display_login":"Extazystas"}}