a packages for validate audio file in django
Project description
Django Audio Validator 🔉
This Library a Audio Validator For Django With d MIME type checking the magic numbers signature And Extension Use FileType Library
Feature 📌
- Audio File Type Check Use MIME Type
- Audio File Extension Check
Audio Type Supported ✅
- 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
How Use ? 👇
-
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)
Contribute This Project 🔗
If you would like to help me develop this project, you can do so through this link
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-audio-validator-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8480a14de7b3912238091e748fd53b97e5c23607473170914fd152af540d778 |
|
MD5 | 71ba277375999051afe3e74a91232176 |
|
BLAKE2b-256 | bfc7ef57ed590ae5d7633b911bf0b350dbc2606843a17b5823f72b30604bb41b |
Close
Hashes for django_audio_validator-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f3e3c6691d5a47fc051c7da943fdddec3ff5911ea78075a09412a320f56e792 |
|
MD5 | 01d9507eb00df0c82ea11e2c565f8a10 |
|
BLAKE2b-256 | 8c67f26108233a376b06e590c001b22dff87b2b7abdafbdebfaf52ee6f18f0d4 |