[Seaside] Re: View PDF in browser

bobn at rogers.com bobn at rogers.com
Mon Dec 19 20:11:41 UTC 2011


Boris,
Thanks, nice catch.
No filename in the response was indeed the difference.

Bob


________________________________
 From: "Boris Popov, DeepCove Labs" <boris at deepcovelabs.com>
To: Seaside - general discussion <seaside at lists.squeakfoundation.org> 
Sent: Monday, December 19, 2011 2:46:53 PM
Subject: RE: [Seaside] Re: View PDF in browser
 
I just tested the below locally in Chrome and Firefox,

"Chrome downloads the file; Firefox prompts to download the file"
self requestContext respond: 
        [:response |
        response document: ((WAMimeDocument on: bytes mimeType:
'application/pdf')
    
fileName: filename;
    
yourself)]

"Chrome opens the document in the browser; Firefox opens the document in
the browser"
self requestContext respond: 
        [:response |
        response document: (WAMimeDocument on: bytes mimeType:
'application/pdf')]

-Boris

-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Yanni
Chiu
Sent: Monday, December 19, 2011 2:36 PM
To: seaside at lists.squeakfoundation.org
Subject: [Seaside] Re: View PDF in browser

<bobn <at> rogers.com> writes:
> 
> Neither made a difference.
> 
> Is there something else you're suggesting?

Nothing other than what you tried.

At this point, I'd look at the actual bytes being sent in the two cases.
I still think there's a difference in the http headers. I usually use
"telnet"
to the http port, and respond with "GET <your-URL-here> HTTP/1.1".


_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20111219/2a0b765e/attachment.htm


More information about the seaside mailing list