# Multiuploader [](https://travis-ci.org/vinaypost/multiuploader) [](https://pypi.python.org/pypi/mutiuploader)
Multiuploader - is an application which enable ability to upload multiple files in Django.
Installation
$ pip install multiuploader
Then you should append ‘multiuploader’ to your INSTALLED_APPS and run
$ python manage.py makemigrations $ python manage.py migrate multiuploader
Also, if you want previews for uploaded images you need to do syncdb for sorl.thumbnail.
You must have at least Django 1.10 version or later.
Also you need to append ‘multiuploader.context_processors.booleans’ to your TEMPLATE_CONTEXT_PROCESSORS.
Setup
In your settings.py you may use these options to configure application:
MULTIUPLOADER_FILES_FOLDER = ‘multiuploader’ - media location where to store files
MULTIUPLOADER_FILE_EXPIRATION_TIME = 3600 - time, when the file is expired (and it can be cleaned with clean_files command).
MULTIUPLOADER_FORMS_SETTINGS =
{
'default': {
'FILE_TYPES' : ["txt","zip","jpg","jpeg","flv","png"],
'CONTENT_TYPES' : [
'image/jpeg',
'image/png',
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.ms-excel',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/vnd.ms-powerpoint',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/vnd.oasis.opendocument.text',
'application/vnd.oasis.opendocument.spreadsheet',
'application/vnd.oasis.opendocument.presentation',
'text/plain',
'text/rtf',
],
'MAX_FILE_SIZE': 10485760,
'MAX_FILE_NUMBER':5,
'AUTO_UPLOAD': True,
},
'images':{
'FILE_TYPES' : ['jpg', 'jpeg', 'png', 'gif', 'svg', 'bmp', 'tiff', 'ico' ],
'CONTENT_TYPES' : [
'image/gif',
'image/jpeg',
'image/pjpeg',
'image/png',
'image/svg+xml',
'image/tiff',
'image/vnd.microsoft.icon',
'image/vnd.wap.wbmp',
],
'MAX_FILE_SIZE': 10485760,
'MAX_FILE_NUMBER':5,
'AUTO_UPLOAD': True,
},
'video':{
'FILE_TYPES' : ['flv', 'mpg', 'mpeg', 'mp4' ,'avi', 'mkv', 'ogg', 'wmv', 'mov', 'webm' ],
'CONTENT_TYPES' : [
'video/mpeg',
'video/mp4',
'video/ogg',
'video/quicktime',
'video/webm',
'video/x-ms-wmv',
'video/x-flv',
],
'MAX_FILE_SIZE': 10485760,
'MAX_FILE_NUMBER':5,
'AUTO_UPLOAD': True,
},
'audio':{
'FILE_TYPES' : ['mp3', 'mp4', 'ogg', 'wma', 'wax', 'wav', 'webm' ],
'CONTENT_TYPES' : [
'audio/basic',
'audio/L24',
'audio/mp4',
'audio/mpeg',
'audio/ogg',
'audio/vorbis',
'audio/x-ms-wma',
'audio/x-ms-wax',
'audio/vnd.rn-realaudio',
'audio/vnd.wave',
'audio/webm'
],
'MAX_FILE_SIZE': 10485760,
'MAX_FILE_NUMBER':5,
'AUTO_UPLOAD': True,
}}
it is a dictionary with multiple form settings. When you append a multiuploader, you can choose a preconfigured form type, which will accept only extensions and content types you’ve provided.
All these parameters are optional.
Metadata
Release files for multiuploader 0.1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| multiuploader-0.1.3.1.tar.gz | 10.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| multiuploader-0.1.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.0 kB
Release files / multiuploader-0.1.3.1.tar.gz
| Download URL | multiuploader-0.1.3.1.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eeb7047f2b2ac6069c8565de13e77601cf1ca4b351556d5e030492d6e752df02
|
|
BLAKE2b-256 checksum How to use checksums |
9a6e9a8c39df410b0a8e1f72a5a4eee2c9075488b76671302fd1a7b722db233a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / multiuploader-0.1.3.1-py3-none-any.whl
| Download URL | multiuploader-0.1.3.1-py3-none-any.whl |
|---|---|
| Size | 18.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33d6351dfc8b90842d6c1cf2e981bfd47fd34026e8fc87f75577488730030ae2
|
|
BLAKE2b-256 checksum How to use checksums |
4831e019cdafe56204dbd43077752640ce3334697a20f5bb08f5506181d2b982
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |