Solved

image preview before file upload

Posted on 2004-04-30
4
984 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
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…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to dynamically set the form action using jQuery.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now