Closed arteymix closed 7 years ago
Just a note: only attachment
should be uploaded from multipart messages. If possible, reconstruct the message body for the next middleware.
app.get ("", upload_multipart (File.new_for_path ("upload"))).then ((req, res) => {
// req contains form data, attachements are stripped :)
});
It might also be nice to have a middleware that extract multipart/form-data
and forward a HashTable
or some multimap data structure.
I think we're good with multipart stream support now.
A very simple middleware to upload the request body into a file named against the
Content-Disposition
header.With #105, a
upload_multipart
middleware should be provided to upload all parts of the message in separate files.