House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

ColdFusion MX and FORM file oddity

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
I am using something relative to the following code:
Jaye Morris - jayeZERO.com
12/05/02 09:47 A
How are you getting this ?
webguy
12/05/02 09:52 A
The variable you want to call is actually
Valerie L. Criswell
12/05/02 10:53 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jaye Morris - jayeZERO.com
12/05/2002 09:47 AM

I am using something relative to the following code: <form action="blahblahblah.cfm" method="post" enctype="multipart/form-data"> <input type="File" name="uploadedFileName"><br>             <input type="Submit" value="Upload Now"> </form> During the process, I am attempting to catch the variable "uploadedFileName,"  but instead of getting a file name like myfilename.zip or whatever, I get something like: R:\CFusionMX\runtime\servers\default\SERVER-INF\temp\wwwroot-tmp\neotmp1 6991.tmp Being that neotmp16991.tmp is not the file name and is really something like myfilename.zip, how do I get that actual file name as opposed to what is seen above. -//-  Jaye Morris - Multimedia Developer -//-  jaye@navtrak.net - www.navtrak.net -//-  jaye@jayezero.com - www.jayezero.com

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
webguy
12/05/2002 09:52 AM

How are you getting this ? > R:\CFusionMX\runtime\servers\default\SERVER-INF\temp\wwwroot-tmp\neotmp1 > 6991.tmp This looks like the tmp file created before <cffile action=upload > Show us your blahblahblah.cfm template WG

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Peter Bagnato
12/05/2002 10:43 AM

You might want to try something like this instead: <!---Code in the upload form---> <form enctype="multipart/form-data" action="upload_action.cfm" method="post"> File to upload: <input type="file" name="uploadfile" size="40"> <input type="submit" name="Upload" value="Upload"> </form> <!--- code in the action form---> <cffile action="upload" filefield="UploadFile" destination="d:\temp\" nameconflict="unique"> File uploaded successfully: Filename on client: <cfoutput>#cffile.clientfile#</cfoutput><br> Filename on server: <cfoutput>#cffile.serverfile#</cfoutput><br> File Size: <cfoutput>#cffile.filesize#</cfoutput><br> <!--- move file to another folder ---> <cffile action="move" source="D:\temp\#cffile.serverfile#" destination="d:\junk\#cffile.serverfile#"> <br> File successfully moved to D:\Junk\<cfoutput>#cffile.serverfile#</cfoutput> Peter Bagnato I am using something relative to the following code: <form action="blahblahblah.cfm" method="post" enctype="multipart/form-data"> <input type="File" name="uploadedFileName"><br>             <input type="Submit" value="Upload Now"> </form> During the process, I am attempting to catch the variable "uploadedFileName,"  but instead of getting a file name like myfilename.zip or whatever, I get something like: R:\CFusionMX\runtime\servers\default\SERVER-INF\temp\wwwroot-tmp\neotmp1 6991.tmp Being that neotmp16991.tmp is not the file name and is really something like myfilename.zip, how do I get that actual file name as opposed to what is seen above. -//-  Jaye Morris - Multimedia Developer -//-  jaye@navtrak.net - www.navtrak.net -//-  jaye@jayezero.com - www.jayezero.com

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Valerie L. Criswell
12/05/2002 10:53 AM

The variable you want to call is actually #File.ServerFile# This is the default name assigned by CF to any just uploaded file.  There's also a host of other available attributes.  Check the docs for more info. hth, ~Val ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference