March 18th, 2004, 07:50 AM
Check filename before Uploading
Does anybody know if it is possible to check the filename of a file that somebody wants to uploud before it is uploaded to the server with CFFILE.
If I do a display of the <input type="file" name="test"> you get the tempfilename.
March 18th, 2004, 10:15 AM
Not really. You could have two forms, one which take the file name and the on submission it checks that name against the server, and if there is no match then it displays the upload form. But there's no way to do a check like that without some sort of round trip to the server, because until the file is uploaded CF doesn't know what the name of the file is, so there's no way it can check beforehand.