[Seaside] Re: View PDF in browser

Boris Popov, DeepCove Labs boris at deepcovelabs.com
Mon Dec 19 19:46:53 UTC 2011


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


More information about the seaside mailing list