- Notifications
You must be signed in to change notification settings - Fork3
Django audio validator that verifies the mime and extension of audio files.
License
rzashakeri/django-audio-validator
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
I made a more complete library with which you can validate all types of files, the new project has been tested and also supports more types, you can access it through the following link:file validator
This Library a Audio Validator For Django With d MIME type checking the magic numbers signature And Extension Use FileType Library
- Audio File Type Check Use MIME Type
- Audio File Extension Check
- aac -
audio/aac
- midi -
audio/midi
- mp3 -
audio/mpeg
- m4a -
audio/mp4
- ogg -
audio/ogg
- flac -
audio/x-flac
- wav -
audio/x-wav
- amr -
audio/amr
- aiff -
audio/x-aiff
First Install The Library Use The Command :
pip install django-audio-validator
Import Library In Your Model :
from audio_validator.validator import AudioValidator
Pass Validator To Your Model And Set Type Of Audio :
Template :
AudioValidator("Audio Type Supported")
Code Example :
class Attachment(models.Model): audio = models.FileField( upload_to=user_directory_path, blank=True, validators=[AudioValidator("mp3")], ) created_at = models.DateTimeField(auto_now_add=True)
If you would like to help me develop this project, you can do so through thislink
About
Django audio validator that verifies the mime and extension of audio files.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.