Solved

image preview before file upload

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
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…
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 create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

734 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