3. The
response. In the case Seaside is serving we can set
Content-Disposition in the response. Setting it means that browsers
downloads the file, even if it could be displayed in the browser
window.
Ah, I thought I mentioned if you stick "inline" in
WAReponse>>attachmentWithFileName: aString
self headerAt: 'Content-Disposition' put: 'inline; attachment;
filename="', aString, '"'
see
http://www.ietf.org/rfc/rfc2183.txt
Then Safari is happy to show PDF files in the browser, versus downloading
Ahh, interesting. I wasn't aware of that, only that removing the
Content-Disposition altogether has the same effect but also loses
control over the filename. That should solve at least the problems
when the file is served through Squeak/Seaside.
Thanks for the hint.
Lukas
--
===========================================================================
John M. McIntosh <johnmci(a)smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.
http://www.smalltalkconsulting.com
===========================================================================
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
--
Lukas Renggli
http://www.lukas-renggli.ch