Let the user preview the file before uploading it
I am programming a control so that our intranet users can upload multiple files to our system, but with some additional functionality.
Imagine you, as a user, upload N files, when you add N files, the intranet presents you with a list like this:
File_name_1 ..... [View] [Delete] [Download]
File_name_2 ..... [View] [Delete] [Download]
.
...
...
File_name_n ..... [View] [Delete] [Download]
[Delete all files] [Download all files]
If you click on the "View" button, a file named "file_name_X" will open so that you can view it and make sure that it is indeed the file you want to download.
Is it possible? I'm new to the world of web programming and everything I've found assumes that browsers don't allow you to access the local filesystem from the internet, but I'm not sure.
a source to share
One way to do this is that you load first, but only load it into the "Staging" area. This way it wouldn't actually be tied to your system.
This is what Gravatar does, which loads the file and then lets you crop and adjust the image before saving.
The only other way I have seen is using an ActiveX control like in IE or some other browser extension mechanism.
a source to share
Uploading files while presenting a good user interface including upload progress reporting is tricky.
I suggest Yahoo UI Uploader Widget: http://developer.yahoo.com/yui/uploader/
It is also the basis for the Flickr uploader, see the YUI blog post: http://yuiblog.com/blog/2009/02/26/flickr-uploadr/
Larry
a source to share