Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Django audio validator that verifies the mime and extension of audio files.

License

NotificationsYou must be signed in to change notification settings

rzashakeri/django-audio-validator

Repository files navigation

DownloadsPyPI versionDocumentation Status


file validator

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


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 📌

  1. Audio File Type Check Use MIME Type
  2. 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 ? 👇

  1. First Install The Library Use The Command :

    pip install django-audio-validator

  2. Import Library In Your Model :

    from audio_validator.validator import AudioValidator

  3. 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 thislink

About

Django audio validator that verifies the mime and extension of audio files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp