or is there a way for me to add new file-ending -...
# ktor
j
or is there a way for me to add new file-ending --> mimeType mappings without modifying the source?
d
Which mimetype do you want to support? Maybe a PR including it would benefit other people too. Have you tried to include a
mimelist.csv
in the resources folder of your app? (not tried it myself but worth trying)
j
No, i have not tried that one yet.
I managed to solve my problem by building a local jar and including that.
the new mapping would be: .ts --> video/MP2T
btw, this illustrates a use case for custom overrides: .tsv can could also map to "video/MP2T" instead of ".tsv,text/tab-separated-values"
d
I see. Then your best bet is to use that workaround for now. But I think it would make sense to allow to either add additionally csv files / new mime type associations programmatically. Thanks for the feedback! 🙂 Can you create an issue here? https://github.com/ktorio/ktor/issues
j
You wrote above: Have you tried to include a
mimelist.csv
in the resources folder of your app? (not tried it myself but worth trying)
I have now tried this, and it works.
I'm not familiar enough with Java servers to have come up with that solution.. Still it would be nice to add custom mappings programmatically, IMHO.
d
Yes, I read that. But still, you have to duplicate the whole contents of the file, so I would consider that like a workaround more than a proper solution. So I would still file a new issue to address that later
j
Agreed!
let me see if I can dig up a github account 🙂
👍 1