{"action":"created","issue":{"url":"https://api.github.com/repos/open-swift/S4/issues/58","repository_url":"https://api.github.com/repos/open-swift/S4","labels_url":"https://api.github.com/repos/open-swift/S4/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/open-swift/S4/issues/58/comments","events_url":"https://api.github.com/repos/open-swift/S4/issues/58/events","html_url":"https://github.com/open-swift/S4/pull/58","id":155710306,"number":58,"title":"Support for Multipart forms","user":{"login":"Joannis","id":1951674,"avatar_url":"https://avatars.githubusercontent.com/u/1951674?v=3","gravatar_id":"","url":"https://api.github.com/users/Joannis","html_url":"https://github.com/Joannis","followers_url":"https://api.github.com/users/Joannis/followers","following_url":"https://api.github.com/users/Joannis/following{/other_user}","gists_url":"https://api.github.com/users/Joannis/gists{/gist_id}","starred_url":"https://api.github.com/users/Joannis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joannis/subscriptions","organizations_url":"https://api.github.com/users/Joannis/orgs","repos_url":"https://api.github.com/users/Joannis/repos","events_url":"https://api.github.com/users/Joannis/events{/privacy}","received_events_url":"https://api.github.com/users/Joannis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-19T11:03:37Z","updated_at":"2016-05-19T15:33:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/open-swift/S4/pulls/58","html_url":"https://github.com/open-swift/S4/pull/58","diff_url":"https://github.com/open-swift/S4/pull/58.diff","patch_url":"https://github.com/open-swift/S4/pull/58.patch"},"body":"Currently S4 doesn't support multipart forms. Multipart forms are, however, an essential part of websites and webservers and we'll need to discuss our approach towards it.\r\n\r\nI've implemented Multipart form-parsing in Vapor yesterday and I think more libraries are to support this soon enough. Let alone libraries that I support it outside of my knowledge.\r\n\r\nMultipart is made to support two kinds of information. Files and Input.\r\nInput would refer to any form input that is not input[type=\"file\"].\r\nAnd both `input` as well as `file` can be an array.\r\n\r\nHTML `select` (which supports multiple `option`s would be an example of an input array.\r\nAnd `<input type=\"file\" multiple=\"multiple\" />` is an example of multiple files."},"comment":{"url":"https://api.github.com/repos/open-swift/S4/issues/comments/220362432","html_url":"https://github.com/open-swift/S4/pull/58#issuecomment-220362432","issue_url":"https://api.github.com/repos/open-swift/S4/issues/58","id":220362432,"user":{"login":"LoganWright","id":5750489,"avatar_url":"https://avatars.githubusercontent.com/u/5750489?v=3","gravatar_id":"","url":"https://api.github.com/users/LoganWright","html_url":"https://github.com/LoganWright","followers_url":"https://api.github.com/users/LoganWright/followers","following_url":"https://api.github.com/users/LoganWright/following{/other_user}","gists_url":"https://api.github.com/users/LoganWright/gists{/gist_id}","starred_url":"https://api.github.com/users/LoganWright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LoganWright/subscriptions","organizations_url":"https://api.github.com/users/LoganWright/orgs","repos_url":"https://api.github.com/users/LoganWright/repos","events_url":"https://api.github.com/users/LoganWright/events{/privacy}","received_events_url":"https://api.github.com/users/LoganWright/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T15:33:34Z","updated_at":"2016-05-19T15:33:34Z","body":"It might be nice if we use a type as opposed to a tuple for file:\r\n\r\n```Swift\r\n(filename: String?, mediaType: (type: String, subtype: String)?, data: Data)\r\n```\r\n\r\nCould be:\r\n\r\n```Swift\r\nextension MultipartForm {\r\n    struct File {\r\n        let filename: String?\r\n        let mediaType: (type: String, subtype: String)? // might be worth a type here as well, but it's simpler than file, so feels less concerning\r\n        let data: Data\r\n    }\r\n}\r\n```"}}