Skip to content

Conversation

@gi
Copy link

@gi gi commented Oct 2, 2020

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

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 mattt#103
@gi gi force-pushed the issue-103/type-file branch from 6e883b5 to 58d9431 Compare October 2, 2020 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File: add support for File/UploadedFile types

1 participant