[Seaside] Making a download page
avishefi at gmail.com
Fri Mar 11 09:11:45 UTC 2011
The headers look fine. I'm interested in your code, specifically from where
you get a MultiByteFileStream.
Could you elaborate please? maybe supply your code?
On Fri, Mar 11, 2011 at 10:19 AM, AA <aa at serendip.demon.co.uk> wrote:
> Hi Avi
> WAFileLibrary mimetypeFor: is a better method, thanks! WAAnchorTag >>
> document:mimeType:fileName: doesn't seem to work with MultiByteFileStream; I
> get errors.
> In any case, with the current code, the response headers appear to be
> correct, so it probably indicates a problem with nginx. Just for reference,
> this is what I get from 'Transcript show: response headers':
> a WAHeaderFields('Content-Type'->'image/png'
> 'Content-Disposition'->'attachment; filename="/downloads/test.png"'
> I'll keep digging, just want to verify that I'm doing things properly on
> the Seaside end!
> On Thu, 10 Mar 2011 21:53:13 +0200
> Avi Shefi <avishefi at gmail.com> wrote:
> > As for the detection of mime types, why not use: WAFileLibrary
> > (aFilename copyAfterLast: $.)
> > The bug that MIMEDocument class>>#forURIReturnSingleMimeTypeOrDefault:
> > doesn't exist is associated with Pharo, not with Seaside (the class is in
> > Pharo package named Network-MIME). You're invited to file a bug in the
> > issues list: http://code.google.com/p/pharo/issues/list
> > As for the MultiByteFileStream - I looked around and I *think*
> > can accept a MultiByteFileStream, which is later on converted to a
> > WAMimeDocument. Have you given this a try?
> > In general, if you somehow managed to get a MultiByteFileStream, it means
> > that you should also hold the path to that file. So why not pass this
> > to the nginx-related X-Sendfile headers?
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside