|
Mailing Lists
|
Home / Groups / ColdFusion Talk (CF-Talk)
cffile issueYou 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 |
May 24, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||