Giter Site home page Giter Site logo

savoirfairelinux / django-resumable-uploads Goto Github PK

View Code? Open in Web Editor NEW

This project forked from erudit/django-resumable-uploads

0.0 6.0 0.0 1011 KB

Resumable file uploads for Django with plupload

License: GNU General Public License v2.0

Python 6.10% CSS 2.04% JavaScript 91.21% HTML 0.65%

django-resumable-uploads's Introduction

Build Status Coverage

django-resumable-uploads

django-resumable-uploads is a multi-file resumable upload app. It uses plupload and jQuery in the backend.

Requirements

  • Django 1.6+

Getting started

  1. Add 'plupload' to your INSTALLED_APPS

  2. Register urls in your root urlconf urls.py adding string to your urlpatterns like so :

    # The url where the upload form is located:
    url(r'^$', 'plupload.views.upload'),
  3. Specify the directory in which you would like to save the uploaded files. For example:

    UPLOAD_ROOT = '/opt/project/media/uploads/
  4. Link your model to the ResumableFile model:

    class MyModel(models.Model):
    
        file_uploads = models.ManyToManyField(
            'plupload.ResumableFile'
        )
  5. For any model form in which you would like to enable resumable uploads, use the PlUploadFormField. All the values in the options dictionary will be passed to the PlUpload widget constructor:

    class FileUploadForm(models.ModelForm):
    
        class Meta:
            model = MyModel
    
        file_uploads = PlUploadFormField(
            path='uploads',
            label=_("Fichier"),
            options={
                "max_file_size": '15000mb',
                "drop_element": 'drop_element',
                "container": 'drop_element',
                "browse_button": 'pickfiles'
            }
        )

For the full list of options that can be passed to PlUpload, please refer to:

http://www.plupload.com/docs/Options

Roadmap

  • Make PlUploadFormField fully customizable

Running the tests

  • We use tox as a test runner. To run the tests, install tox on your system or in a virtual environment and run it in the root of the project:

    $ tox

Contributing

  • All contributions are welcome. Please make sure the tests pass before submitting a pull request.

For any question, suggestion or additional help, feel free to contact dcormier on Freenode.

django-resumable-uploads's People

Contributors

cormier avatar hevela avatar

Watchers

Emmanuel Milou avatar James Cloos avatar Jérôme Oufella avatar Morgan Aubert avatar Ernesto Rodriguez Ortiz avatar  avatar

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.