<cfheader name="Content-Disposition" value="attachment;
filename=#YourFile.FileName#">
<cfcontent type="image/jpg" file="#YourDirectory#\#YourFile.FileName#">



On Mon, Oct 18, 2010 at 4:48 PM, Les Mizzell <lesm...@bellsouth.net> wrote:

>
> I've got a section of a site where a user can access a number of logo
> downloads, including tiff, jpeg, ai, or gif formats.
>
> There are thumbs on the download page, with links on each thumb like:
>
> <a href="resource_download.cfm?logo=72-dpi-jpg" target="_blank">
>
> This takes them to the resource_download processing page (located in the
> same directory as the files to be downloaded), which runs a query to
> record which logo they downloaded along with a date/time stamp.
>
> What is supposed to happen next is that the selected file is pushed to
> them so they can save it. This is where I'm having problems.
>
> So, after the query runs:
>
> <CFHEADER
>    NAME="content-disposition"
>    value="attachment;
>    filename=#get.logo#">
>
> Looks correct so far...
>
> But, let's say I selected a jpg. The dialog comes up ("SAVE" or "OPEN"),
> I select "SAVE", and when I try to open the file in Photoshop I get an
> error "Could not complete your request because a JPEG marker segment
> length is too short. The file may be truncated or incomplete.
>
> If I just tell it to "OPEN" the file instead of saving - I get a blank doc.
>
> If I grab the file FTP from the server, it seems to be fine and
> saves/opens properly.
>
> What's wrong here? Suggestions?
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338309
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to