Hi all,
I am creating a user directory dynamically when a user creates an account. The name of the directory is named as the username (so that its easy to keep track of the user)
WHat im trying to do is to upload a JPEG or GIF image file into the user's directory defined by the username i.e upload the file into the directory named #client.username# - This works fine,
However, on the action page I want to display the image but it does not seem to work i.e. the variable #imagesection1# is not displayed, instead it displays a temp directory as the value of the variable?
I hope this makes sense..
I have attached the code:
Uploading
<CFFORM ACTION="Viewsite.cfm?cfid=#cfid#&cftoken=#cftoken#" METHOD="POST" ENCTYPE="MultiPart/Form-Data">
<B> Image for section 1 </b><BR>
<INPUT TYPE="File" NAME="ImageSection1">
<BR>
<INPUT TYPE="submit" VALUE="process">
<INPUT TYPE="reset" VALUE="Clear">
The action page:
<CFFILE ACTION="Upload"
FILEFIELD="ImageSection1"
DESTINATION="c:\webshare\
<!--- this syntax directly below displays the full path to the directory, after #client.username# a temp directory is displayed i.e. c:\webshare\ --->
<CFOUTPUT>c:\webshare\
<!--- Displaying the image variable --->
<CFOUTPUT>
<IMG SRC= "c:\webshare\</cfoutput>
I think CFFILE ACTION = "ReadBinary" might be the asnwer??
Is what I'm trying to do possible??
Many thanks and best regards
Sam
I am creating a user directory dynamically when a user creates an account. The name of the directory is named as the username (so that its easy to keep track of the user)
WHat im trying to do is to upload a JPEG or GIF image file into the user's directory defined by the username i.e upload the file into the directory named #client.username# - This works fine,
However, on the action page I want to display the image but it does not seem to work i.e. the variable #imagesection1# is not displayed, instead it displays a temp directory as the value of the variable?
I hope this makes sense..
I have attached the code:
Uploading
<CFFORM ACTION="Viewsite.cfm?cfid=#cfid#&cftoken=#cftoken#" METHOD="POST" ENCTYPE="MultiPart/Form-Data">
<B> Image for section 1 </b><BR>
<INPUT TYPE="File" NAME="ImageSection1">
<BR>
<INPUT TYPE="submit" VALUE="process">
<INPUT TYPE="reset" VALUE="Clear">
The action page:
<CFFILE ACTION="Upload"
FILEFIELD="ImageSection1"
DESTINATION="c:\webshare\
<!--- this syntax directly below displays the full path to the directory, after #client.username# a temp directory is displayed i.e. c:\webshare\ --->
<CFOUTPUT>c:\webshare\
<!--- Displaying the image variable --->
<CFOUTPUT>
<IMG SRC= "c:\webshare\</cfoutput>
I think CFFILE ACTION = "ReadBinary" might be the asnwer??
Is what I'm trying to do possible??
Many thanks and best regards
Sam