Solved

Displaying the selected file that the user chooses to upload.

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

760 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

18 Experts available now in Live!

Get 1:1 Help Now