sinatra-param icon indicating copy to clipboard operation
sinatra-param copied to clipboard

Add `File` as valid param type

Open gi opened this issue 5 years ago • 0 comments

With a type declaration of File, the input parameter hash of the uploaded file is coerce into a new UploadedFile object which conforms to the Rack::Multipart::UploadedFile interface.

The input parameter hash must be of the shape:

  • filename: the original file name of the uploaded file
  • head: the header lines of the multipart request
  • name: the parameter name
  • tempfile: the Tempfile created from the content of the multipart request
  • type: the content media/MIME type

Fixes #103

gi avatar Oct 02 '20 17:10 gi