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

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

cffile issue

Author:
Turetsky, Seth
05/12/2003 04:50 PM

You could use javascript to get the name of the file before submitting, then write to a hidden field.  Then use your logic to get the first character of the input field. Hi all, I am trying to extract the filename from a filename formfield 'BEFORE' it is uploaded. I am using the <input type="file" name="someName"> form tag to let the user browse to the file they wish to upload I have used File.ServerFile to capture it in the past, but File.ServerFile does not exist until after the <cffile> tag has completed it's task. Reason... I want to spread the uploads across many directories so that I don't have 5000 uploaded files all in one directory and was planning on using the first character of the filename to direct the upload into one of 36 different directories 0-9 and a-z. How can I see the filename before the <cffile> tag executes? thanks, Brrrian


Search cf-talk

May 24, 2013

<<   <   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