Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Displaying the selected file that the user chooses to upload.

Posted on 2000-04-19
1
Medium Priority
?
177 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
[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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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 embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

609 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