Solved

image preview before file upload

Posted on 2004-04-30
4
989 Views
Last Modified: 2010-08-05
I have file upload element <input type="file" ...> on my form to let user upload images.
I need preview functionality, when user clicks "Browse..." on file upload element he can select image to be uploaded, but before whole form is submitted I want to show preview of the image in the user client browser (before uploading). HTML and client side javascript please.
0
Comment
Question by:amakalski
4 Comments
 
LVL 3

Accepted Solution

by:
bradleyland earned 250 total points
ID: 10961677
Javascript is not allowed to access files in the local directory structure. It's a security constraint. The only way you can get this functionality on the client is through an activex object.
0
 
LVL 14

Assisted Solution

by:dfu23
dfu23 earned 100 total points
ID: 10962011
bradleyland is correct ...

you can show the image via the web page only by using a plug-in or uploading the image to your site ...

the other possibilty is to mention to users that have Windows XP they can switch to Thumbnail View when they click to browse for an image.
0
 

Author Comment

by:amakalski
ID: 10962787
okey, thank you
0
 

Expert Comment

by:zz85
ID: 12135329
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
This video teaches users how to migrate an existing Wordpress website to a new domain.

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question