Solved

Displaying the selected file that the user chooses to upload.

Posted on 2000-04-19
1
173 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 100 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

829 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