Created
October 12, 2016 11:13
-
-
Save sdogruyol/a531d3446a37c71544ed6f05ee84e7fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Upload | |
field : String | |
data : IO::Delimited | |
meta : HTTP::FormData::FileMetadata | |
headers : HTTP::Headers | |
end | |
def parse_multipart(env) | |
HTTP::FormData.parse(env.request) do |field, data, meta, headers| | |
yield Upload.new field, data, meta, headers | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment