Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб Django Media Files - Restricting Uploadable File Types with Validators and python-magic в хорошем качестве

Django Media Files - Restricting Uploadable File Types with Validators and python-magic 1 год назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



Django Media Files - Restricting Uploadable File Types with Validators and python-magic

In this video, we will look at how to restrict the types of files that can be uploaded by users in our Django applications. We will see three methods on how to restrict this data: * Using file input's 'accept' parameter * Using Django's FileExtensionValidator * Using python-magic to verify the contents of the file match the extension. We'll also see how to write a custom validator in Django and add multiple validators to a single Model field. 📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀: 00:00 Intro 02:27 File Input accept attribute 06:03 Adding Django FileExtensionValidator to model FileField 10:09 Using python-magic in Django Validator to check file content ☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲: To support the channel and encourage new videos, please consider buying me a coffee here: https://ko-fi.com/bugbytes ▶️ Full Playlist:    • Django Media Files   𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮: 📖 Blog: https://bugbytes.io/posts/ 👾 Github: https://github.com/bugbytes-io/ 🐦 Twitter:   / bugbytesio   📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻: File Input: https://developer.mozilla.org/en-US/d... Accept Attribute: https://developer.mozilla.org/en-US/d... Django FileExtensionValidator: https://docs.djangoproject.com/en/4.1... Python-magic: https://pypi.org/project/python-magic/ #python #django #mediafile

Comments