{"action":"created","issue":{"url":"https://api.github.com/repos/sdogruyol/kemal/issues/223","repository_url":"https://api.github.com/repos/sdogruyol/kemal","labels_url":"https://api.github.com/repos/sdogruyol/kemal/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/sdogruyol/kemal/issues/223/comments","events_url":"https://api.github.com/repos/sdogruyol/kemal/issues/223/events","html_url":"https://github.com/sdogruyol/kemal/pull/223","id":182482127,"number":223,"title":"Extra information on Multi-Part FormData","user":{"login":"miguelm","id":233737,"avatar_url":"https://avatars.githubusercontent.com/u/233737?v=3","gravatar_id":"","url":"https://api.github.com/users/miguelm","html_url":"https://github.com/miguelm","followers_url":"https://api.github.com/users/miguelm/followers","following_url":"https://api.github.com/users/miguelm/following{/other_user}","gists_url":"https://api.github.com/users/miguelm/gists{/gist_id}","starred_url":"https://api.github.com/users/miguelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguelm/subscriptions","organizations_url":"https://api.github.com/users/miguelm/orgs","repos_url":"https://api.github.com/users/miguelm/repos","events_url":"https://api.github.com/users/miguelm/events{/privacy}","received_events_url":"https://api.github.com/users/miguelm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-12T09:49:39Z","updated_at":"2016-10-12T09:56:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sdogruyol/kemal/pulls/223","html_url":"https://github.com/sdogruyol/kemal/pull/223","diff_url":"https://github.com/sdogruyol/kemal/pull/223.diff","patch_url":"https://github.com/sdogruyol/kemal/pull/223.patch"},"body":"Hi @sdogruyol ,\r\n\r\nFirst let me thank you for your work on Kemal!\r\n\r\nI was on a hackaton last weekend and used Crystal/Kemal, but one of the hurdles i was trying to tackle was multi part file upload onto my server, thankfully a PR about multipart was merged a few days before the hackaton that solved half my problem.\r\n\r\nNevertheless i found that not all info from the file was yielded:\r\n- [your code ](https://github.com/sdogruyol/kemal/blob/master/src/kemal/helpers/helpers.cr#L94)\r\n- [RX14 code](https://github.com/RX14/multipart.cr/blob/master/src/http/formdata.cr#L43)\r\n\r\nInside his code was metadata like the filename that i direly needed to accomplish what i set out to do. Hence i forked your repo and expanded the yielded parameters to the ones RX14 provides.\r\n\r\nFeel free to discard this or accept.\r\nIf there's any changes that you deem necessary let me know\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/sdogruyol/kemal/issues/comments/253170369","html_url":"https://github.com/sdogruyol/kemal/pull/223#issuecomment-253170369","issue_url":"https://api.github.com/repos/sdogruyol/kemal/issues/223","id":253170369,"user":{"login":"miguelm","id":233737,"avatar_url":"https://avatars.githubusercontent.com/u/233737?v=3","gravatar_id":"","url":"https://api.github.com/users/miguelm","html_url":"https://github.com/miguelm","followers_url":"https://api.github.com/users/miguelm/followers","following_url":"https://api.github.com/users/miguelm/following{/other_user}","gists_url":"https://api.github.com/users/miguelm/gists{/gist_id}","starred_url":"https://api.github.com/users/miguelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguelm/subscriptions","organizations_url":"https://api.github.com/users/miguelm/orgs","repos_url":"https://api.github.com/users/miguelm/repos","events_url":"https://api.github.com/users/miguelm/events{/privacy}","received_events_url":"https://api.github.com/users/miguelm/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T09:56:42Z","updated_at":"2016-10-12T09:56:42Z","body":"This will allow the following:\r\n\r\n```ruby\r\nparse_multipart(env) do |field, data, meta, headers|\r\n  if field == \"file\"\r\n    media_file = data.gets_to_end\r\n    File.write(\"./tmp/#{meta.filename}\", media_file)\r\n  end\r\n  puts \"Upload complete\"\r\nend\r\n```\r\n\r\nWe can now get the filename or other others"}}
{"actor":{"display_login":"miguelm"}}