Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Downloading files using CFContent 1

Status
Not open for further replies.

afterdigital

Programmer
Jun 22, 2002
9
US
I've set up my webpage with cffile to upload files

and cfdirectory to display all contents in directory.

Using CFCONTENT i've tried to download the files but can't.

The following code was suggested but it doesn't work;

<cfif IsDefined(&quot;url.dlfile&quot;)>
<cfheader name=&quot;content-disposition&quot; value=&quot;inline; filename=#url.dlfile#&quot;>
<cfcontent type=&quot;application/zip-compression&quot; file=&quot;/home/public/files/#url.dlfile#&quot;>
</cfif>

<cfoutput><a href=&quot;#cgi.script_name#?dlfile=#name#&quot;> #name#</a>
</cfoutput>

Using this code I get the following error:

*******************************************
Error Diagnostic Information
An error occurred while attempting to open the file.

Unix error number 13 occurred: Permission denied
*******************************************

The directory has all rights and the files being uploaded are given full rights. Is this a rights issue? or code issue?

Any help would be appreciated...

Thanks

Javier



 
thread232-313224

This code did work....

(blindsided.zip is where you enter the real filename to hide)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top