On 7 Nov 2008, at 16:24, Dr. Jennifer Nussbaum wrote:

Anyone willing to help me on this? :-) Im only missing four bytes, somewhere.... Or adding them rather.

I'm not sure of this but I'm guessing you will need to do something like:

    binmode $upload->fh;

so the file is treated as binary data before calling "$upload->slup".

HTH,
Adeola.




--- On Thu, 11/6/08, Dr. Jennifer Nussbaum <[EMAIL PROTECTED]> wrote:

From: Dr. Jennifer Nussbaum <[EMAIL PROTECTED]>
Subject: Re: [Catalyst] PDF upload problems (prob OT)?
To: [email protected]
Date: Thursday, November 6, 2008, 9:15 AM
Christopher Taranto wrote:

--- On Thu, 11/6/08, Dr. Jennifer Nussbaum
<[EMAIL PROTECTED]> wrote:

And then my display code is:

# $document is already grabbed from the database
$c->res->output($document); # overloaded to
stringify
to $document->document

$c->res->headers->content_type($document->type);

$c->res->headers->header('Content-Disposition'
=> 'attachment;
filename=".$document->filename);

My feeling is that you are treating the output as text
when in fact a PDF
file is a binary file.

Im not clear on how to treat it different. The
Catalyst::Response docs dont say anything about how to do
this. What do i need to do to signal that this is a binary
file?

And separately, is my "Content-Disposition" thing
the right way of handlign the filename?

Thanks.

Jen




_______________________________________________
List: [email protected]
Listinfo:
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive:
http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/




_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

--
Creative Developer - Digital Craftsmen Ltd
Exmouth House, 3 Pine Street
London, EC1R 0JH
t: +44 20 7183 1410
f: +44 20 7099 5140
m: +44 75 9527 7886
w: http://www.digitalcraftsmen.net/






_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to