I would like some help in figuring out how to handle file validation
in my application. I have a series of processing that I'd like to
happen at various stages. Some of this validation might have to happen
outside of Django itself, like using JavaScript in the actual form as
the files that are to b
You could avoid the Javascript check (file extensions are just a
convention, rarely thrustable) and just check the uploaded file
mimetype on form validation code.
`import mimetypes` for more.
There's no clean way to interrupt file upload, though.
On Mar 12, 11:27 pm, Vincent wrote:
> I would li
Thanks for the reply hcarvalhoalves.
I can see bypassing the file name extensions as you have mentioned,
they don't guarantee the file type anyway. That said, I would like to
be able to use some other means than mimetypes as I need to make sure
that the files are of a specific type (e.g. not just
3 matches
Mail list logo