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

Correct file extension based on mimetype #8

Open
jarus opened this issue Nov 12, 2014 · 1 comment
Open

Correct file extension based on mimetype #8

jarus opened this issue Nov 12, 2014 · 1 comment

Comments

@jarus
Copy link
Contributor

jarus commented Nov 12, 2014

Hi,

it would be a nice feature to change the file extension of the uploaded file to a guest file extension from mimetype. Sometimes users uploads images or other files with the wrong extension.

I already implemented this functionality but this currently requires a subclass of FieldFile.

@hirunatan
Copy link
Member

Thanks, could you send me your implementation, as an example? Sounds interesting.

Any way, i don't consider that automatically correcting the file extension is a good thing, or at least some thing that is responsability of this module. Perhaps it would be more appropriate to (optionally) check the extension and give an error if it does not match the mimetype (so the user decides what to do).

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

No branches or pull requests

2 participants