|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
How to initiate download dialog when downloading jpg files?
Author: Butch Zaccheo
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32377#162603
thanx again for the help bryan...
I don¹t think there is a clear way to make it work for mac browsers...
I¹ll have to try a different route...
On 5/7/04 11:24 AM, "Bryan F. Hogan" <bryan.hogan@cfm-applications.com>
wrote:
----- Excess quoted text cut - see Original Post for more -----
Author: Bryan F. Hogan
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32377#162596
I don't know of another way. What is needed for this to work is to trick
the browser into thinking it is not a known document type.
Try this content-type "application/x-msdownload" or "do the google" (c)
by me ;-)
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=content-type%2Bmac%2Bie
Butch Zaccheo wrote:
> I probably should give you a little more info.... I¹m testing this in IE 5
> OSX... It works fine on the pc side but not on the mac side... is there
> another way of doing this.. maybe with a
javascript?
Author: Butch Zaccheo
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32377#162593
I probably should give you a little more info.... I¹m testing this in IE 5
OSX... It works fine on the pc side but not on the mac side... is there
another way of doing this.. maybe with a javascript?
On 5/7/04 11:11 AM, "Bryan F. Hogan" <bryan.hogan@cfm-applications.com>
wrote:
----- Excess quoted text cut - see Original Post for more -----
the
>> > dialog box.
Author: Bryan F. Hogan
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32377#162591
Doing it like below returns the image in the browser?
test.cfm
<a href="download.cfm?image=test.jpg">Download test.jpg</a>
download.cfm
<cftry>
<cfheader name="content-disposition"
value="attachment;filename=#url.image#">
<cfcontent type="application/unknown"
file="#expandPath('..')&'\documents\'&url.image#" deletefile="no">
<cflocation url="test.cfm" addtoken="no">
<cfcatch type="any"> </cfcatch>
</cftry>
Butch Zaccheo wrote:
> when I run the
> script, it just loads the image in the browser window without initiating the
> dialog
box.
Author: Butch Zaccheo
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32377#162589
Actually I figured out the syntax error (strange characters when I pasted
content) ... and it seems to be running fine now... but... when I run the
script, it just loads the image in the browser window without initiating the
dialog box.
On 5/7/04 10:59 AM, "Bryan F. Hogan" <bryan.hogan@cfm-applications.com>
wrote:
----- Excess quoted text cut - see Original Post for more -----
Author: Bryan F. Hogan
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32377#162587
What is the value of url.image?
Butch Zaccheo wrote:
> Hey Bryan... I get this error when I try and use the code you provided? I¹m
> not sure what the problem is...
Author: Butch Zaccheo
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32377#162577
Hey Bryan... I get this error when I try and use the code you provided? I¹m
not sure what the problem is...
BZaccheo
Invalid token ' ' found on line 5 at column 1.
The CFML compiler was processing:
* a cfheader tag beginning on line 4, column 7.
* a cfheader tag beginning on line 4, column 7.
The error occurred in
C:\Domains\edirolextra.com\wwwroot\sitedirector\site\details.cfm: line 5
3 : <cftry>
4 : <cfheader name="content-disposition"
5 : value="attachment;filename=#url.image#">
6 : <cfcontent type="application/unknown"
7 :
file="#request.siteDirectory##request.delimiter#images#request.del
imiter#site_images#request.delimiter##url.image#" deletefile="no">
On 5/7/04 9:09 AM, "Bryan F. Hogan" <bryan.hogan@cfm-applications.com>
wrote:
----- Excess quoted text cut - see Original Post for more -----
Author: Bryan F. Hogan
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32377#162556
http://www.cfm-applications.com/expressive_v1_b2/index.cfm?entryID=2055
> I want the ³Save As² dialog box to open when a link to an image file is
> clicked on. Right now (as I¹m sure you are familiar with) it displays the
> image in the browser window rather than opening the ³Save As²
dialog.
Author: Butch Zaccheo
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32377#162555
I¹m sure there¹s an easy way to do this, but I don¹t know what it is.
I want the ³Save As² dialog box to open when a link to an image file is
clicked on. Right now (as I¹m sure you are familiar with) it displays the
image in the browser window rather than opening the ³Save As² dialog.
Any help would be much appreciated.
BZaccheo
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||