Opened 20 months ago

Last modified 19 months ago

#33942 closed New feature

file validator — at Version 5

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 (last modified by Reza Shakeri)

I want to add a file validator to Django using the native Python library called mimetypes https://docs.python.org/3/library/mimetypes.html
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 wrote a file validator library using Python, which you can use using the link below and see its codes:
https://github.com/rzashakeri/file_validator

Change History (5)

comment:1 by Reza Shakeri, 20 months ago

Description: modified (diff)

comment:2 by Reza Shakeri, 20 months ago

Summary: file validatorfile validator - validate file use mime

comment:3 by Reza Shakeri, 20 months ago

Summary: file validator - validate file use mimefile validator - validating file with mime and file magic numbers

comment:4 by Reza Shakeri, 20 months ago

Summary: file validator - validating file with mime and file magic numbersfile validator - validating file with mime and magic numbers

comment:5 by Reza Shakeri, 20 months ago

Description: modified (diff)
Summary: file validator - validating file with mime and magic numbersfile validator
Note: See TracTickets for help on using tickets.
Back to Top