?
Solved

Displaying the selected file that the user chooses to upload.

Posted on 2000-04-19
1
Medium Priority
?
178 Views
Last Modified: 2010-04-09
I am looking for help on how I can display the gif,jpg, etc. that the user selects to upload.

I allow a user to upload a picture

<input type="file" name="smallimgfile">

When the user selects a file, I would like to display the image before they hit the submit button.  This will allow them to verify that they selected the correct picture.
<imgsrc="whateverfile the user selected" alt="" border=0>

FYI...I am using coldfusion.
0
Comment
Question by:dualdragon
1 Comment
 
LVL 5

Accepted Solution

by:
Jan Louwerens earned 300 total points
ID: 2732948
For security reasons, there is no way to access files on the client machine (including images). So there is no way to do exactly as you are describing. You can, however, display the image once it has been uploaded to the server using the file input tag. So you can't really have them preview it before uploading it, but you can have a 2 step process where they upload the file, and then you display that file, asking them if it is the file they meant to send.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

850 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