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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Downloading attachment - SSL - cfheader

Status
Not open for further replies.

slippenot

Programmer
Oct 31, 2006
7
US
I have a page where i would like users to save/download images to their machine. Im currently using the following code:

<cfheader name="Content-Type" value="image/jpeg">
<cfheader name="Content-Disposition" value="attachment;filename=#filename#">
<cfcontent type="image/jpeg" file="#absolutepath#/#filename#" deletefile="no">

Unfortunately this is not working with SSL. I receive the "not able to download the error where it says its not able to download. Ive read where you have to update the the cache-control and expire header variables but I'm still not able to get it to work.

How do you verify/set http headers within coldfusion?
 
Thanks for the feedback. I recently discovered that our application is designed to not allow caching on a users machine. That is why it wouldnt work. To get around this I disabled the left-click and displayed a message informing the user to right-click and click save-target-as.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top