Rocket
Rocket copied to clipboard
Missing content types for cbr, cbz and epub
Existing Functionality
NamedFile responder creates the Content-Type header based on the file extension, the from_extension does not account for a few file types I am using in a personal project. I've done a work around using a custom struct wrapping a NamedFile, however I've also added the types I need to a fork. If you would like them added here I would be happy to make a PR.
Suggested Changes
Add the missing types:
- .cbr
- .cbz
- .epub
Alternatives Considered
N/A
Additional Context
N/A
If these are registered with IANA or have another de facto normative support source, then please do submit a PR indicating the source.
Hi again, I would also like to add .opf and .xhtml to the known list (see here and here). Would you mind if I tack that on to the existing PR, or would you prefer a separate one?
Adding to the existing PR is totally fine!
Alright thank you! I added them 🙂
Resolved in c8b8b2b022fc2aa4befba80729d85ae4be9d6d47.