Rocket icon indicating copy to clipboard operation
Rocket copied to clipboard

Missing content types for cbr, cbz and epub

Open aaronleopold opened this issue 3 years ago • 4 comments

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

aaronleopold avatar Jun 05 '22 05:06 aaronleopold

If these are registered with IANA or have another de facto normative support source, then please do submit a PR indicating the source.

SergioBenitez avatar Jun 05 '22 05:06 SergioBenitez

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?

aaronleopold avatar Jun 07 '22 21:06 aaronleopold

Adding to the existing PR is totally fine!

SergioBenitez avatar Jun 08 '22 02:06 SergioBenitez

Alright thank you! I added them 🙂

aaronleopold avatar Jun 08 '22 03:06 aaronleopold

Resolved in c8b8b2b022fc2aa4befba80729d85ae4be9d6d47.

SergioBenitez avatar Apr 05 '23 19:04 SergioBenitez