Kemal::FileUpload
A file part of a multipart/form-data request, spooled to a temporary file
that is removed when the request is over.
Read it with open, or hand path to whatever stores it:
upload = env.params.files["image"]
upload.open { |file| IO.copy(file, destination) }
File.copy(upload.path, "public/uploads/#{upload.filename}")
Constructors
new(upload)
SourceInstance methods
cleanup
Sourcecreation_time
Sourcefilename
Sourceheaders
Sourcemodification_time
Sourceread_time
Sourcetempfile
The upload as an open File, positioned at its start, kept open until the
request is over. A handle per upload is what the default ulimit runs out
of a few concurrent requests in; open closes when it is done, and path
needs no handle at all.