Link to home
Start Free TrialLog in
Avatar of ChrisMDrew
ChrisMDrew

asked on

ASP.NET - Viewing images stored on a users PC

I want to create a file upload web page which will allow photographs to be uploaded to the web server.  What I really want is for the user to specify a folder and for the web page to display thunbnails of each of the images in the folder with checkboxes so that the user can select which images to upload and then upload them.

My main question is how would I display a thumbnail image of a photo located on the users PC without first uploading it?  The images are likely to be very large as they will be high resolution photos.
Avatar of ChrisMDrew
ChrisMDrew

ASKER

After more browsing it seems that I cannot get a list of images on the users selected folder - seems obvious really as it would be a security risk.  Is there a better way of being able to select multiple files to upload and then getting a thumbnail of each?
ASKER CERTIFIED SOLUTION
Avatar of Kamal Khaleefa
Kamal Khaleefa
Flag of Kuwait image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jesse Houwing
You will need to use Silverlight, Flash or Java to get this done. Standard HTML controls doe not have access to the information you want.

These plugins can request additional rights to show data through user selected folders (file picker) or after a security prompt can get full access to a users machine. And they have specific built in support for these kinds of scenario's (plus these scenarios are well documented).

If you want to stick to HTML and Javascript, there are browser specific API's to gain access to the local file system. Firefox for example can request access to your local filesystem through the following call:
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");

But this only works if you have signed your javascript file:
http://www.mozilla.org/projects/security/components/signed-scripts.html

The CommonJS project is also working on Filesystem access libraries for Javascript. I'm not sure how far along they are:
http://wiki.commonjs.org/wiki/CommonJS

Sorry took a while to get back to this as the project hasn't yet got the go-ahead