Manny Calavera
Manny Calavera

Reputation: 6873

Multiple image upload without flash

I want to use HTML and PHP for 9 or more images upload. The problem is that I don't want 9 upload fields because it looks bad. Does anybody have any suggestions ? Maybe examples ?

Thanks.

Upvotes: 2

Views: 7640

Answers (4)

mwilcox
mwilcox

Reputation: 4132

Connect to the fileInput's onchange event, hide it, get the value and add it to a textarea, and create another. Name them all the same plus an increment: field1, field2... Loop through the field names in PHP and check for existance with isset.

Or use Dojo's FileUploader and force html: http://docs.dojocampus.org/dojox/form/FileUploader

Upvotes: 1

kangax
kangax

Reputation: 39168

I've been using noSWFUpload for some time and it works pretty good. It relies on XMLHttpRequest's sendAsBinary in supporting clients and falls back to iframe-based submission.

Upvotes: 5

James Black
James Black

Reputation: 41858

What I have done in the past is to give an option on doing another upload, or, when they pick the first file, display it as a label, then have another box ready for them to pick another file. Each file input is actually with a unique name, so the server just goes through until it doesn't find the next file.

But, this requires a bit of javascripting. :)

Upvotes: 0

Related Questions