Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FILE Attributes W/ Multiple Uploads

Status
Not open for further replies.

rmz8

Programmer
Aug 24, 2000
210
US
Sorry for the barrage of posts, but this will be the last. I have 15 seperate file upload boxes. On the action page I want the FILE.SERVERFILE for only the first upload box (named upFile1) to be saved. How will simply referring to FILE.SERVERFILE know which uploaded file I want the attribute for (in this case, upFile1)?

Ryan ;-]
 
Hey Ryan,

The cffile.serverFile is set (and reset) after each <cffile action=&quot;upload&quot;...>. It may be reset after just a plain <cffile> but I'm not certain. Therefore, just after you do a <cffile action=&quot;upload&quot; fieldfield=&quot;UpFile1&quot;....>, the cffile.serverFile will contain the file name you want and you can save it at that point. The next <cffile action=&quot;upload&quot;..> will change it to the file name that was just processed. You can think of it as all the files are available to CF but they don't actually get written to the server until you do a <cffile> upload and the serverFile variable contains the last one you uploaded. As far as I know, you can do the <cffile>s in any order and just upload the one your interested in last and you won't even have to worry about saving it's name.

Hope this helps,
GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top