Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4253664
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:58:34+00:00 2026-05-21T04:58:34+00:00

I looked at this question: Uploading multiple files with Django but it did not

  • 0

I looked at this question:

Uploading multiple files with Django

but it did not seem to help as I have issues regarding it:

  1. I don’t want to deal with flash sessions using SWF Upload and Uploadify because I need to do uploads that only authenticated users can do.
  2. newforms are for older versions of django, I am using 1.3

Using Django, how can I have this HTML form structure:

<form enctype="multipart/form-data" action="." method="post">
 <label for="id_image_1">Image 1</label>
 <input type="file" name="image[]" id="id_image_1" />

 <label for="id_image_2">Image 2</label>
 <input type="file" name="image[]" id="id_image_2" />
</form>

and handle it using a view?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:58:34+00:00Added an answer on May 21, 2026 at 4:58 am

    If you have a fixed number of filefields, you could simply define a form with enough filefields, or add filefields programatically in a form’s constructor. See the Django docs on File Uploads.

    If you want some sort of dynamic functionality (a la gmail’s “add another file”), then you could define a formset using a form with a single filefield. Display a single form initially and when you want to add another, use a little javascript to produce the new form and update the formset’s management form. There are a number of snippets floating around to help you do this, though they may need some tweaking. See the Django docs on File Uploads and Formsets.

    Another option may be to use a custom widget and field, though I have not reviewed or tried this.

    On the off-chance you aren’t aware, the name=”image[]” scheme is PHP specific and has no special meaning in other languages, unless you reimplement it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note: I've looked at this question: Preventing SQL injection without prepared statements (JDBC) .
Silly question; I've been wanting to use Doctrine with CodeIgniter on a personal portfolio
I have an iPhone web application that creates a meta viewport tag dynamically, using
I have recently put together a JWS application which gets it's argument from a
I am implementing a tag cloud on a mobile device. The details of data-model
I've got some non-node data in a custom module of mine and I would
Suppose I want to create a custom FTP server, that is: It will look
As a small exercise I am trying to write a very small, simple game
I would like to do something like the following: F_BEGIN F(f1) {some code} F(f2)
I'd like to modify the output stream for a JAXB marshalling operation to include

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.