Skip to main content
April 16, 2008
Question

Uploaded File Location using cffile?

  • April 16, 2008
  • 2 replies
  • 314 views
Greetings"

I have a form users fill out and send and have the option to attach a file:
cffile action = "upload"
filefield = "FileContents"

In order to get this to work, I needed to create a field in the DB named "FileContents".

When a file is uploaded, this gets stored in the FileContents : C:\ColdFusion8\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\neotmp315.tmp

The actual file does get uploaded to a directory folder that I specify with "destination=".

When an admin views the form submission, is there a way to display a link to the actual file that was uploaded ?

Something like:

<cfif #FileContents# IS ""> 
<cfelse><a href ="#filenamofuploadedfile#"> Click here to surface Uploaded File</a></cfif>?

Thanks in advance

newportri

This topic has been closed for replies.

2 replies

April 16, 2008
Bob:

Thanks for your quick reply.

I will try this later today and post if it works-

Thanks again

newportri
Inspiring
April 16, 2008