This content has been marked as final.
Show 3 replies
-
1. Re: Force Download from URL
Dave Watts Dec 16, 2011 10:10 AM (in response to wmkolcz)You can't do that directly from the CFCONTENT tag, but there's no reason why you can't fetch it with CFHTTP, store it locally, then use CFCONTENT to serve that.
Dave Watts, CTO, Fig Leaf Software
-
2. Re: Force Download from URL
wmkolcz Dec 16, 2011 11:02 AM (in response to Dave Watts)I couldn't find a good example of how to save it locally so i could server it then delete the file. Do you know a good example or have one?
-
3. Re: Force Download from URL
Sojovi Dec 21, 2011 10:47 AM (in response to wmkolcz)First (taken from the Adobe Docs)
<cfhttp method="Get" url="http://www.adobe.com/adobe/accessibility/images/spotlight.jpg" path="c:\temp" file="My_Savedimage.jpg">
Get spotlight.jog and save into c:\temp\mysavedimage.jpg
Second :
<cfheader name="Content-disposition" value="attachment;filename=thefilenametodownload.jpg" />
<cfcontent type="image/jpg" file="c:\temp\My_Savedimage.jpg" />Et voila



