Genadinik
Genadinik

Reputation: 18629

Uploading multiple photos in a form

I have a photo-upload form that allows a user to upload 1 photo. But my users are complaining that they want to upload many photos. How can I allow them to do that?

Right now I have this form for uploading: http://www.hikingsanfrancisco.com/account/upload_hike_photos.php?hike_id=58

(I tried to paste code, but it didn't work somehow)

Any thoughts how to best go about it? Is there a way to loop through the selected files maybe? (I am using PHP)

Thanks, Alex

Upvotes: 1

Views: 2103

Answers (3)

Marco
Marco

Reputation: 1232

Add more fields for uploading files, I don't know, maybe file or six, and the upload button will check through php which of them have information to start the upload, 1 at a time or course, in a php loop.

Upvotes: 2

KJYe.Name
KJYe.Name

Reputation: 17169

Here is a plugin that uses flash + javascript (MooTools) to do file upload. The upside to this plugin is that it's supported and you can Github it. It can have multiple photo uploads, limit max size, etc, and verify file information before upload. Also, has example for backend using PHP on how files are handled after it is uploaded.

Fancyupload

Features

  • Select and upload multiple files
  • Filter files by type in the select
  • dialog A lot of possible Events to add your own behaviour
  • Show and filter useful file information before the upload starts
  • Limit uploads by file count, type or size
  • Platform and server independent, just needs Flash9+ (> 95% penetration) which works on all browsers with it installed

Here is the jQuery plugin that does the same as the MooTools one:

Uploadify

Upvotes: 2

KomarSerjio
KomarSerjio

Reputation: 2911

Add new file inputs. Or use smth like swfuploader for file uploading.

Upvotes: 1

Related Questions