<cflock name="#CreateUUID()#" type="exclusive" timeout="30" throwontimeout="no"> <cfset PAGE_clean_SERVERFILE = replace(cffile.SERVERFILE, " ", "_", "all")> <cffile action="RENAME" source="cffile.SERVERFILE#" destination="#PAGE_clean_SERVERFILE#"> </cflock>
Firstly, the CFLOCK as you have it is pointless. Using a CreateUUID() function to name a lock simply creates a lock that is uniquely named and offers no protection to the code running inside. Your mileage may vary if you call the lock name fileUpload or if you need more granularity, #cffile.serverfile#. Next, I'm not sure if the code you've entered is a copy paste or a retype (I'm assuming a re-type) because you have an error in the cffile tag call. Source should have a # before the cffile. Thirdly, it would help if we could see your CFFILE action="upload" call that actually uploads the file to your server so we can determine what the filename is going to be, eg as you uploaded it or, uniquely renamed by CF as part of the upload process. Paul ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291446 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4