#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    1
    Rep Power
    0

    Check filename before Uploading


    Hi,

    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.

    Thnx
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,275
    Rep Power
    968
    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.

IMN logo majestic logo threadwatch logo seochat tools logo