House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

How to initiate download dialog when downloading jpg files?

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

How to initiate download dialog when downloading .jpg files?

thanx again for the help bryan... Butch Zaccheo 05/07/2004 03:24 PM
I don't know of another way. What is needed for this to work is to trick Bryan F. Hogan 05/07/2004 02:27 PM
I probably should give you a little more info.... I¹m testing this in IE 5 Butch Zaccheo 05/07/2004 02:20 PM
Doing it like below returns the image in the browser? Bryan F. Hogan 05/07/2004 02:15 PM
Actually I figured out the syntax error (strange characters when I pasted Butch Zaccheo 05/07/2004 02:09 PM
What is the value of url.image? Bryan F. Hogan 05/07/2004 02:01 PM
Hey Bryan... I get this error when I try and use the code you provided? I¹m Butch Zaccheo 05/07/2004 01:36 PM
<A HREF="http://www.cfm-applications.com/expressive_v1_b2/index Bryan F. Hogan 05/07/2004 12:11 PM
I¹m sure there¹s an easy way to do this, but I don¹t know what it is. Butch Zaccheo 05/07/2004 12:09 PM

05/07/2004 03:24 PM
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 -----
05/07/2004 02:27 PM
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?
05/07/2004 02:20 PM
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.
05/07/2004 02:15 PM
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.
05/07/2004 02:09 PM
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 -----
05/07/2004 02:01 PM
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...
05/07/2004 01:36 PM
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 -----
05/07/2004 12:11 PM
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.
05/07/2004 12:09 PM
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
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference