Adobe ColdFusion 8

Resolving conflicting filenames

When you save a file to the server, there is a risk that a file with the same name might already exist. To resolve this problem, assign one of these values to the nameConflict attribute of the cffile tag:

Error: (default) ColdFusion stops processing the page and returns an error. The file is not saved.

Skip: Allows custom behavior based on file properties. Neither saves the file nor returns an error.

Overwrite: Overwrites a file that has the same name as the uploaded file.

MakeUnique: Generates a unique filename for the uploaded file. The name is stored in the file object variables serverFile and serverFileName. You can use this variable to record the name used when the file was saved. The unique name might not resemble the attempted name. For more information on file upload status variables, see Evaluating the results of a file upload.