Multiuploader - is an application which enable ability to upload multiple files in Django
Project description
# Multiuploader [![Build Status](https://travis-ci.org/vinaypost/multiuploader.svg?branch=master)](https://travis-ci.org/vinaypost/multiuploader) [![Version Status](https://img.shields.io/pypi/v/multiuploader.svg?style=flat)](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.
Project details
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 multiuploader-0.1.3.1.tar.gz
.
File metadata
- Download URL: multiuploader-0.1.3.1.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeb7047f2b2ac6069c8565de13e77601cf1ca4b351556d5e030492d6e752df02 |
|
MD5 | 0702170e86bba9520d44fd3e5b62bd22 |
|
BLAKE2b-256 | 9a6e9a8c39df410b0a8e1f72a5a4eee2c9075488b76671302fd1a7b722db233a |
File details
Details for the file multiuploader-0.1.3.1-py3-none-any.whl
.
File metadata
- Download URL: multiuploader-0.1.3.1-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33d6351dfc8b90842d6c1cf2e981bfd47fd34026e8fc87f75577488730030ae2 |
|
MD5 | 2640358a1f4e4065ac4a7a23c97bf4d6 |
|
BLAKE2b-256 | 4831e019cdafe56204dbd43077752640ce3334697a20f5bb08f5506181d2b982 |