I am uploading a file name from a form but I need to change the file name and store the new file in the db so I can recall it later. The problem I have is with the extensions. I tried this:
<cfif isdefined(p_picture) contains ".gif">
<cfset picture="pic"&#p_id#&".gif">
<cfelse>
<cfset picture="pic"&#p_id#&".jpg">
</cfif>
It will take only he second option regardless of the extension I put.
<cfif isdefined(p_picture) contains ".gif">
<cfset picture="pic"&#p_id#&".gif">
<cfelse>
<cfset picture="pic"&#p_id#&".jpg">
</cfif>
It will take only he second option regardless of the extension I put.