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
File details
Details for the file django-audio-validator-0.0.3.tar.gz
.
File metadata
- Download URL: django-audio-validator-0.0.3.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20aabb444e4290d38a54fee24908f0e9fd9c3dc680a76a2f5096d26d3390b4be |
|
MD5 | fc4cba9b44d0e3867e02752914d7dc01 |
|
BLAKE2b-256 | e1a69aa828d8fff23fea99d7447a1bedd22499e72e4be29ca870737ac3b47d06 |
File details
Details for the file django_audio_validator-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: django_audio_validator-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7794e2cc4f0ec6c3ebcb04442dd66a5a7a646f598a020475fe741d36feb08088 |
|
MD5 | 836bc00db254f5e62e754a436534d864 |
|
BLAKE2b-256 | d7672f998cf8f30fbeebb39eaa0f0a748f84f47e9010c8ca6e475fc7a8c137a8 |