Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many binary MediaTypes marked as NotBinary #2771

Closed
dwischolek-modulon opened this issue Apr 16, 2024 · 1 comment
Closed

Many binary MediaTypes marked as NotBinary #2771

dwischolek-modulon opened this issue Apr 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dwischolek-modulon
Copy link

Describe the bug
Many content types in that I think should be regarded binary are defined as NotBinary in MediaTypes.scala.
For example:
"application/vnd.ms-excel"
"application/vnd.ms-cab-compressed"
...
This leads to multipart form entries being decoded, becoming unusable in the process.

To Reproduce
Steps to reproduce the behaviour:

  1. Build simple file upload with multipart/form-data
  2. upload .xls file
    => file data is interpreted as FormField.Text and content garbled.

Expected behaviour
.xls file form field would be regarded as FormField.Binary

In general, I think if such a huge list of MimeTypes is even needed, the default behavior should be for the entries to be Binary so that no data is lost due to conversion. At least there should be a way for the user to override individual entries.

@dwischolek-modulon dwischolek-modulon added the bug Something isn't working label Apr 16, 2024
@guersam
Copy link
Contributor

guersam commented Apr 19, 2024

As discussed in #934, the media types are written by hand, not autogenerated from a reliable source. Until it's resolved, please feel free to open PRs to fix misclassified types (although I'm not a maintainer 😅 ).

@jdegoes jdegoes closed this as completed Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants