Skip to content

Instantly share code, notes, and snippets.

Avatar

Darwing Medina darwing1210

  • Nicaragua
View GitHub Profile
@darwing1210
darwing1210 / validators.py
Created May 12, 2017 — forked from jrosebr1/validators.py
Validator for files, checking the size, extension and mimetype for Django.
View validators.py
# @brief
# Performs file upload validation for django. The original version implemented
# by dokterbob had some problems with determining the correct mimetype and
# determining the size of the file uploaded (at least within my Django application
# that is).
# @author dokterbob
# @author jrosebr1
import mimetypes
You can’t perform that action at this time.