How can I get the correct extension of the image that was uploaded to my server. I don't want the client file extension because I'm renaming the image and I need the ext. of whatever was uploaded.
Here is the code to save and then rename.
Here is how I'm displaying the images.I can only display jpgs now.
Thanks for any help.
Here is the code to save and then rename.
Code:
<cffile action="upload"
destination="#thisPath#"
nameConflict= "overwrite"
fileField="Form.FiletoUpload" accept="image/gif, image/pjpeg, image/jpg">
<cfif fileWasSaved>
<cffile action="rename"
source="#ServerDirectory#\#cffile.ClientFileName#.#cffile.ClientFileExt#"
destination="#thisPath##officeimg.Name#.jpg">
</cfif>
Here is how I'm displaying the images.I can only display jpgs now.
Code:
<CFIF Fileexists(ExpandPath("/nicolecfsite/OnlineDir/images/#Contacts.Username#.jpg"))>
<img src="./images/#Contacts.Username#.jpg" height="120" width="120"
border="none" >
Thanks for any help.