Code Monkey home page Code Monkey logo

django-admin-async-upload's Introduction

django-admin-async-upload

https://api.travis-ci.org/jonatron/django-admin-resumable-js.svg?branch=master

django-admin-async-upload is a django app to allow you to upload large files from within the django admin site asynchrously (using ajax), that means that you can add any number of files on the admin page (e.g. through inline models) and continue editing other fields while files are uploading.

django-admin-async-file-uploads is compatible with django-storages (tested with S3Storage)

Screenshot

#TODO: update this screenshot

https://github.com/jonatron/django-admin-resumable-js/raw/master/screenshot.png?raw=true

Installation

  • pip install django-admin-async-upload
  • Add admin_async_upload to your INSTALLED_APPS
  • Add url(r'^admin_async_upload/', include('admin_async_upload.urls')), to your urls.py
  • Add a model field eg: from admin_resumable.models import ResumableFileField
class Foo(models.Model):
    bar = models.CharField(max_length=200)
    foo = AsyncFileField()

Optionally:

  • Set ADMIN_RESUMABLE_CHUNKSIZE, default is "1*1024*1024"
  • Set ADMIN_RESUMABLE_STORAGE, default is setting of DEFAULT_FILE_STORAGE and ultimately 'django.core.files.storage.FileSystemStorage'. If you don't want the default FileSystemStorage behaviour of creating new files on the server with filenames appended with _1, _2, etc for consecutive uploads of the same file, then you could use this to set your storage class to something like https://djangosnippets.org/snippets/976/
  • Set ADMIN_RESUMABLE_CHUNK_STORAGE, default is 'django.core.files.storage.FileSystemStorage' . If you don't want the default FileSystemStorage behaviour of creating new files on the server with filenames appended with _1, _2, etc for consecutive uploads of the same file, then you could use this to set your storage class to something like https://djangosnippets.org/snippets/976/
  • Set ADMIN_RESUMABLE_SHOW_THUMB, default is False. Shows a thumbnail next to the "Currently:" link.
  • Set ADMIN_SIMULTANEOUS_UPLOADS to limit number of simulteneous uploads, dedaults to 3. If you have broken pipe issues in local development environment, set this value to 1.

Versions

Compatibility

Tested on Django 2.2 running on python 3.6 and 3.7

Thanks to

original django-admin-resumable-js by jonatron https://github.com/jonatron/django-admin-resumable-js

django-admin-resumable-js fork by roxel https://github.com/roxel/django-admin-resumable-js (django-admin-async-upload is based on this fork

Resumable.js https://github.com/23/resumable.js

django-resumable https://github.com/jeanphix/django-resumable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.