Solved

image preview before file upload

Posted on 2004-04-30
4
992 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Featured Post

What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

Question has a verified solution.

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

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

628 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