silverorange labs is the playground of silverorange slice logo
silverorange labs

Photo Gallery Bulk Uploading

by Nick Burka  []  -  16 replies

One of the key upgrades to the PhotoGallery System is improving the way photos can be added. At the moment, the system is pretty basic and simply uploads the files individually using <input type="file"> input boxes.

There are various systems out there on commercial sites. Some of these include complex plug-ins that allow drag-and-drop, FTP utilities, and applets. These are all somewhat of a nuisance and require the user to download various bits and pieces to get them working. For a solution, I wanted something that would allow for multiple file uploads, be easy to use, and take a minimum amount of time to develop.

The quick and easy solution that I’m strongly leaning toward is actually incredibly simple. PHP has an excellent set of ZIP File functions. I quickly tested them last weekend and it’s as simple as compiling PHP with zip support, and using the little snippet of demo code on the PHP site. All the user will have to do is take all of the photos they want to upload, place them in a zip file, and upload the zip file to the website. Server-side, the photos are extracted from the zip file, processed, and a wizard allows the user to enter photo information. While not every end user knows how to zip a file, most do, and it’s relatively easy to learn. The only other concern is for Apple or Unix users, though there are functions out there for .sit and .tar files that I could incorporate later.

Has anyone else come up with a bulk-file uploading system, or have alternative ideas or suggestions?

view zip extraction demo
 
Zip IconCode Sample
Zip File
259Kb

Replies to Nick Burka’s post: Photo Gallery Bulk Uploading
Joao Prado Maia []
Please don't rely on requiring your users to use a ZIP-type utility in order to be able to upload multiple files, dynamically.

I already have a system working for allowing multiple dynamic file uploads with some simple DHTML, and PHP's ability to automatically create arrays for input fields named 'some_name[]'.

Is this little tip good enough for you to get started ?

--Joao

Joao Prado Maia []
Ah, indeed. On that case zipping the files is not such a bad thing, but for a normal scenario where the user needs to upload 3 or 4 files, it's not such a problem.

But no, my solution doesn't allow the user to select more than one file at a time. It would be nice if XForms (or the next generation of it) would provide this functionality.

Oh well :)

--Joao

Daniel Von Fange []
Seems like a great solution to the problem. Definitely so competent computer users. Good thinking.
Peter Rukavina []

Apple's Mac OS X has a zip utility built into it. Usage:

zip filename.zip file1...filen

For example:

zip petephotos.zip dog.jpg cat.jpg

It's command line driven, of course, so not as easy as it could me.

To solve this problem for posting to my own website, I wrote a brief AppleScript (OS X's secret weapon) that lets me drag and drop photos on an icon on my desktop, and then copies them to my webserver, resizes them if necessary, and copies HTML required to include them into a weblog post onto my clipboard, from where I can simply paste it as appropriate.

Peter Rukavina []
Thought: modern email clients make emailing photos an easy drag-and-drop operation. Grandmothers know how to do this because it's how they send photos of grandchildren to each other. So, users up at the website, register an email address, and then simply add photos to their "library" by emailing them to a purpose-built email address that accepts photos and processes them.
What would be considered an "average" attachment size limit? I recall that being an obstacle for several similar attempts of mine (caveat: not photos) in the past at solving similar problems.
Adam Kalsey []
A solution I once used on a private extranet for mass file uploading was to open an FTP url in an iframe through the browser. The user then simply drags all their files into the iframe. They can even navigate through the FTP directory structure first if they would like.

The disadvantages of this approach:

You have to embed the FTP username and password in the FTP link.

It depends on browser support, but most modern browsers now support drag and drop FTP uploads.

Peter and Adam, good ideas both.

Peter, I'd already been considering doing the email attachment root. There were a couple reasons I prefered the ZIP file, but I might rethink that; the common knowledge of how to email is definetly attractive. That said, issues with associating email adresses with certain sites, and limits for sending attachments (Hotmail limits this to about 1Mb, receiving of course is not a problem) might cause a few problems.

Adam, I'm going to try out this iframe-FTP idea. I wonder what the browser support is.

Has anyone tried out Adams suggestion of using an iframe to hold the FTP window? It is perfect for one of my current projects but for some reason the first screen loads fine and contains the FTP window within the iframe but any subsequent drilling down looses the wrapper HTML and launches the FTP window into full screen view.

Has anyone else had this problem?

A new tool that we developed can do this. Look at http://www.ibulc.com for more info.
Here is a creative, if not risky, approach to solving this problem.
hi Keir, i have this problem too.. I try with target="internal" in iframe tag, but doesn't work.. ahhgg.. ill be crazy if i continue thinkin about it..
I'm interested to see how this progresses. I've been searching for a decent gallery upload/management tool for ages. Did you solve the problem of multiple uploads yet? Also, what is the status of the system with regards to the intended 'XHTML Strict and CSS Level2 standards compliance'? It's a real shame none of this is being made public, there is a real need for this kind of solution. Though I understand your financial reasons for keeping it locked. Just as a developer this sounds like a very good thing.
I need "FTP bulk upload tool" in php, can anybody post me the details its very urgent.
Hi All,

My problem is exactly the oposite. At a party I took sevoral photos. Now I want to make them available on my website for download. My first idea was to let the visitor select the photos he want to have (stored in a database), have PHP zip them and finaly have PHP mail the zip-file to the visitor.

Anyone know how to do this?

Thanx in advance

Martin

keeruptusaste []
Use our proprietary matching system, create your profile on [url=http://onlinedating-us.net/index.html]dating free sites[/url] and view photos on uk dating site free [url=http://onlinedating-us.net/uk/map.html]uk dating site free[/url].
We have created more marriages than any other [url=http://onlinedating-us.net/map.html]dating free sites[/url]. Get your free trial membership in [url=http://onlinedating-us.net/uk/map.html]UK dating site free[/url]!
Post a Reply
:
:
(optional)
:
(optional)
Your email address will not be displayed with your reply.
:
Are You Human?: