Re: cfheader and pushing a file to the user

2010-10-18 Thread Les Mizzell

On 10/18/2010 7:53 PM, Michael Grant wrote:
>
> 
> 

I had that actually - not using the "type" though as there's a number of 
different file types available.

Turns out it was related to the server issue that was causing a query 
weirdness I was asking about earlier where the two below statements were 
giving different results...

WHERE
   (paID=)
AND (nl_status = 'published' OR nl_status = 'archive

WHERE
   paID=
AND (nl_status = 'published' OR nl_status = 'archive


Restarted the server - all is good.

Hmmm...

~|
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:338319
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfheader and pushing a file to the user

2010-10-18 Thread Michael Grant






On Mon, Oct 18, 2010 at 4:48 PM, Les Mizzell  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:
>
> 
>
> 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:
>
> 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


Re: cfheader and pushing a file to the user

2010-10-18 Thread Dave Watts

> 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:
>
> 
>
> 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:
>
>     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.

You have a CFCONTENT after the CFHEADER to actually serve the file,
right? CFHEADER doesn't actually serve the file.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or o

~|
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:338305
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


cfheader and pushing a file to the user

2010-10-18 Thread Les Mizzell

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:



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:



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:338302
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm