Upload Multiple Files with Django 1.8



This is a very basic tutorial on how to upload multiple files using Django. This doesn’t make use of your models, so it’s very basic. You can however add more functionality to it to link the uploads with your models. I’ve finally uploaded the code on GitHub, so you don’t have to type in the whole thing. Here’s the link:

20 Comments

  1. I just got stick to one problem..after first attempt I again tried uploading files but it is just replacing the last files uploaded…why is it so? could you please ellaborate it..any help would be appreciated..THANK YOU..!!

  2. Hello, is it possible to have a code where the names of the uploaded file are kept unchanged and a str(count) is not added? Im trying to achieve a simple multiple file upload application where I can save the files ( with their filenames) inside a desired directory. Please advise, many thanks πŸ™‚

  3. @Mojoman1 The x is the current item in the loop and count or whatever you like to call it, is the number assigned to that item. So if you loop three times over three items, the first count will be 0, then 1 and so on. Hope it's clear. As for your second question I don't really understand what you're asking, can you be more elaborate please?

  4. hi,
    1) couldnt you just use count and x interchangeably? Like, couldnt you just use either one instead of both for your for loop?

    2) is there a way i can mold this with my text editor from the back end? great vid btw

Leave a Reply

Your email address will not be published.


*