Opened 2 years ago
Last modified 2 years ago
#33942 closed New feature
file validator — at Initial Version
Reported by: | Reza Shakeri | Owned by: | nobody |
---|---|---|---|
Component: | File uploads/storage | Version: | 4.0 |
Severity: | Normal | Keywords: | file-validator, file, validator |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
There is a file validator in Django, but it only validates files using the extension, which is not very reliable. According to the documentation, I wrote a file validator that checks the magic numbers (mimes) of the files, and it is more reliable and reliable with It supports the use of native Python libraries and many mimes
I also created a Python [file_validator](https://github.com/rzashakeri/file_validator) library where, in addition to the Python library, three third-party libraries also perform validation operations.