Git Product home page Git Product logo

multiple-file-upload's Introduction

Multiple File Upload

Example used in the blog post Django Multiple Files Upload Using Ajax

Running Locally

git clone https://github.com/sibtc/multiple-file-upload.git
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver

multiple-file-upload's People

Contributors

vitorfs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multiple-file-upload's Issues

How to delete uploaded photo?

Hi,
Could any one imporve the existing file upload api by adding the delete button for deleting the uploaded file.

Stopped working with Django 2.0.2

my app was perfect until I updated to either Django 2.0.2 or the new jQuery-File-Upload - not sure which? But my code is no longer working.
Spent days with no solution.
It appears the request.FILES are no longer showing up in the view?
Thanks.

should be upgraded to django 1.11

it is true it doesnt work with django 2.0 but it does work with 1.11 so i think it would be best to upgrade requirements to LTS 1.11

Add other filed alongside the upload

If someone wants to add another field like a ChoiceField and/or CharField since the upload button immediately triggers a POST request there's no chance to send other field within the request and therefore form never gets validated. Is it possible to after uploading the files use another submit button for submitting the form include uploaded files at once? some thing like the following snippet?

<form action="/" method="POST">{% csrf_token %}
  <div class="custom-select" style="width:200px;">
      <li>{{ form.interface.label_tag }} {{ form.interface }}</li>
  </div>
<div class="custom-select" style="width:200px;">
      <li>{{ form.environment.label_tag }} {{ form.environment }}</li>
</div>
<br>
  <div style="margin-bottom: 20px;">
    <button type="button" class="btn btn-primary js-upload-photos">
      <span class="glyphicon glyphicon-cloud-upload"></span> Upload files
    </button>
    <input id="fileupload" type="file" name="file" multiple
    style="display: none;"
    data-url="{% url 'home' %}"
    data-form-data='{"csrfmiddlewaretoken": "{{ csrf_token }}"}'>
<br>
</div>
<div style="margin-bottom: 20px;">
    <button type="submit" class="btn btn-success">
        <span class="glyphicon glyphicon glyphicon-ok"></span> Submit
      </button>
    </div>  
    </form>  

In this case, If I hit the submit it raise the field required error for file field and if I hit the upload it raises the error for other fields.

Upload button is not working

Hi,

I tried to use this photo app. Bur this is not working for me.

When I use the basic_upload and click on the "Upload photo" Button, no function. Only the botton became a blue border, but no popup for upload photos.

I checked the static files, and the js files loaded

js/jquery-file-upload/vendor/jquery.ui.widget.js
/home/bix/PycharmProjects/photo_test/apps/static/js/jquery-file-upload/vendor/jquery.ui.widget.js

js/jquery-file-upload/jquery.iframe-transport.js
/home/bix/PycharmProjects/photo_test/apps/static/js/jquery-file-upload/jquery.iframe-transport.js

js/jquery-file-upload/jquery.fileupload.js
/home/bix/PycharmProjects/photo_test/apps/static/js/jquery-file-upload/jquery.fileupload.js

js/basic-upload.js
/home/bix/PycharmProjects/photo_test/apps/static/js/basic-upload.js

Im using Django 2.2 and changed only the urls.py. Any idea, why this is not working?

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.