473,394 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Uploading a file with a Preview Page

Alright well heres my issue, I'm trying to create a preview page for a form we currently use on our website. The only problem I have is right now we have the <input type="file"> field on one page.. it goes to the preview page if so desired and then we have a page that actually takes care of the upload once the user selects submit on the preview page. This seems all fine and well the problem is I can't find a way to pass the file information to from the beginning page to the upload page because without directly going to the page that handles uploading there is a temporary file created and I can't figure out how to get the base file from that. We have a restriction of the cffile upload too for only word, powerpoint, and excel files.

Any help would be great thanks.
Jun 8 '07 #1
3 3456
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

Have you seen this article?

If you still have problems, can you please post your code.
Jun 8 '07 #2
Alright yeah I did read that, and didn't really address the issue

basically this is what I have on one page:

Expand|Select|Wrap|Line Numbers
  1. <input name="annFile" type="file" size="48" id="annFile">
on the preview page:

Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" name="annFile" value="#FORM.annFile#" />
which is just used to pass information along

and on the action page:

Expand|Select|Wrap|Line Numbers
  1. <cffile action="upload" filefield="annFile" destination="#fileUploadDir#" accept="application/vnd.ms-word,application/msword,application/pdf,application/vnd.ms-excel,application/vnd.ms-powerpoint" nameconflict="makeunique" result="annUpload">

The problem is when it encounters the action page it is using the temp file and that isn't being accepted... nor do I want the temp file to be uploaded I want the actual file to be uploaded.

If you can assist that would be more than appreciated.

Thanks.
Jun 8 '07 #3
acoder
16,027 Expert Mod 8TB
During file upload, the file is already uploaded by the time it comes across cffile. A preview is not possible without an upload anyway. So I would suggest that you upload on the preview page. The upload page would confirm the upload by storing the path in the database or whatever. If it's not to be uploaded, you can delete it.
Jun 9 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Chamomile | last post by:
can anyone point me to some straightforward information on file uploading without using an html form? That is, direcly from within a php script. if I know the local path etc. to a particular...
0
by: Jim S. | last post by:
I made an upload form (in php) that upload some data to a database and a picture to the web space. everything works fine, but I would like to add the ability to preview the picture/image before...
0
by: Mike | last post by:
Sites using thumbnail preview for world wide web file navigation and searching. Below are list of sites that are either researching or providing thumbnail preview images for online web...
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
3
by: Kumarasamy.Mani | last post by:
Hi all, I'm having the following issue in image preview. I'm having an File Upload option in my web page, there i'm having one more option preview. When the user is uploading the image using...
5
by: Chris | last post by:
I have a meetings section I'm developing on our intranet. Using PHP/MySQL. Meeting info and Meeting docs reside on 2 related tables in the db. Users may want to upload anywhere from 1 to 10 or...
2
by: foxykitty | last post by:
Hi this is my first time creating a web sit / page. I have no knowledge of HTML so am really trying my luck! I have created a page in .doc which contains text and images, I have then viewed the...
2
by: Jinx08 | last post by:
I am probably an itermediate user when it comes to flash however I am at a loss with this problem. I have posted numerous flash files to the internet and never had this problem however the key there...
2
by: Tim Streater | last post by:
The following test page is intended to allow the user to choose an image file, and then display it. It works as expected in Safari 3.1.1, FF 2.0.0.14 (Mac), and IE7 (XP). But, it fails in FF...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.