How do i upload/ download and view documents in coldfusion. I've used
<img src="../userPics/#PictureName#" width="103" height="146" border="1" alt="Picture">
to view an image saved in a database!
I've managed to the same for a word document using:
<cfif fileupload1 eq "">
<cfset file1 = "">
<cfelse>
<cfset vpath1=GetTemplatePath()>
<cfset vlen=len(vpath1)>
<cfset vpath=left(vpath1,vlen-26)>
<cfset vpath=vpath&"Documents">
<cffile action="Upload"
filefield="fileupload1"
destination="#vpath#"
nameconflict="MAKEUNIQUE">
<cfset file1 = "#File.ServerFileName#" & "." & "#File.ServerFileExt#">
</cfif>
But how do i view this document in another page??
<img src="../userPics/#PictureName#" width="103" height="146" border="1" alt="Picture">
to view an image saved in a database!
I've managed to the same for a word document using:
<cfif fileupload1 eq "">
<cfset file1 = "">
<cfelse>
<cfset vpath1=GetTemplatePath()>
<cfset vlen=len(vpath1)>
<cfset vpath=left(vpath1,vlen-26)>
<cfset vpath=vpath&"Documents">
<cffile action="Upload"
filefield="fileupload1"
destination="#vpath#"
nameconflict="MAKEUNIQUE">
<cfset file1 = "#File.ServerFileName#" & "." & "#File.ServerFileExt#">
</cfif>
But how do i view this document in another page??