Question about cffile
Him I am using the following cffile to upload an image to a folder on the website, but wanted to know if there a way that it will rename the file according to the userID in the database. For example.... image name is jackson.jpg and Jackson's userID is 12, so i would like the image to be renamed to 12.jpg. Hope thats makes sense. I know this is a super simple upload system which is why i need help. Thanks
======= cffile code =============
<cfif isDefined("fileUpload")>
<cffile action="upload"
fileField="fileUpload"
destination="C:\ColdFusion9\wwwroot\myWebsite\user_images"
accept="image/jpg,image/jpeg">
<p>Thank you, your file has been uploaded.</p>
</cfif>
<cfform enctype="multipart/form-data" method="post">
<cfinput type="file" name="fileUpload" />
<cfinput type="submit" name="file_submit" value="Upload File" />
</cfform>
