views:

39

answers:

1

I'm trying to find something that will let users upload multiple files to a website. The requirements are that it let them easily select multiple files (preferably with something like check boxes) and that it displays a preview of the images they select.

I'd prefer to only use Javascript or Flash if possible, but Java is also an option (this needs to work on platforms where Silverlight isn't available).

So far all I've been able to find are things that use the native file selector (which doesn't show previews on Windows, and makes it unclear that you can select multiple by holding ctrl).

I'm not sure if the preview requirement is even possible, but it's the most important.

A: 

I am assuming 2 things here:

1) Some kind of client/enduser will be doing the file upload

2) You get some kind of say on what the client installs on their computer to help make this happen.

If this is the case, my first suggestion would be:

Give them FTP or SFTP client software to upload files. The php page you make can have a link to Filezilla, along with instructions on how to use it. ftp and sftp are THE protocols to use for transferring files. HTTP is just not designed(well) for it, nor are browsers.

Once the user has the (S)FTP client software installed, you can give them URL's to upload files to that are specific to their user account, and you can have a backend script process and load/move files that they upload. It's pretty easy to create a local temporary directory using a server side script, have the client upload files via ftp, then go back to the web browser and click a button that says "Done uploading, please process my stuff".

The browser can even give back confirmations on everything that gets uploaded/processed.

Zak
This is a web app, and FTP would make it far more complicated and harder to use. Wwe can say "You must have Flash installed to use the multiple file uploader" because most people have Flash, and it pretends to be part of the browser so there's no extra setup on their part. Very few people have Filezilla, and it does require that users put in a bunch of settings on their own. Not to mention Filezilla doesn't do any of the things I asked about anyway (previews/checkboxes), and it would require adding another script to go through the upload directory and process things (no feedback for users).
Brendan Long
Well, this is why I hate apps like the one you are trying to design. Flash is a horrible abomination that completely screws my privacy by letting flash cookies do all kinds of tracking and other crap across sites and sessions. I can easily preview files locally on my computer already, Filezilla is a great program for doing ftp, and if a website treats me like an idiot, I will kindly respond by removing my business. Once my files are uploaded, the server should easily be able to let me do further management, including previews, resizing/cropping, using simple javascript before saving them.
Zak
I completely understand. If was uploading files for my own use I *would* use FTP (over ssh), but most users don't want to set up an FTP client just to upload a couple photos, and when going through huge directories of badly-named files (I don't know about you, but I have them), having a preview is extremely helpful. Not to mention that I don't want to set up an FTP server and deal with permissions and folders for thousands of users. I assume this could be automated, but why bother if I can just deal with a form submission?
Brendan Long
Now you're just making excuses. FTP server's user sets can be configured to use ldap, text files, or databases to authenticate users. They can probably even use whatever one-offed web-based user authentication scheme you've got running on your web-app. As for me, I *prefer* using my OS based navigation tools to go though directories of file images on my local comp. IMHO, the only people who have gotten this right are google with their desktop picasa app. They basically realized HTML and http based image uploading is lame, then did it the right way.
Zak
It doesn't change the fact that I'd have to set up an entire new program with authentication and a script to deal with it **and** it's more work for users. Most people would prefer to click a link, select what they want and click "Go", rather than open a different program, upload stuff, then come back to their browser and tell the web app that they're done. And of course, it's impossible to get users to do something if they have to set up themselves (why webmail and Flash games are so popular). Remember: Programmers have different preferences than most people and I'm not targeting programmers.
Brendan Long
This it the last thing I'll say on the subject. You already have to write a script to deal with the uploaded files. You already have a user account database. Instead of writing a file browsing app in flash, you save all that trouble with a preexisting ftp client. It's not impossible to have users use a different program for something. How many people have access to web based email, but still use thunderbird, outlook, eudora, or mac mail for their email client because it's just plain *better*. Nearly everyone. Point, match, game.
Zak
One more thing: How many people *who aren't computer people* use desktop applications for email? Not a single one I've ever met (except when required by work to use Outlook).
Brendan Long