[Seaside] Making a download page

Avi Shefi avishefi at gmail.com
Fri Mar 11 09:11:45 UTC 2011


Amir,
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?


Cheers,
Avi.

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"'
> 'X-Accel-Redirect'->'/downloads/test.png')
>
> I'll keep digging, just want to verify that I'm doing things properly on
> the Seaside end!
>
> Thanks,
>
> Amir
>
>
>
> 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
> mimetypeFor:
> > (aFilename copyAfterLast: $.)
> > The bug that MIMEDocument class>>#forURIReturnSingleMimeTypeOrDefault:
> > doesn't exist is associated with Pharo, not with Seaside (the class is in
> a
> > Pharo package named Network-MIME). You're invited to file a bug in the
> Pharo
> > issues list: http://code.google.com/p/pharo/issues/list
> >
> > As for the MultiByteFileStream - I looked around and I *think*
> WAAnchorTag
> > 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
> path
> > to the nginx-related X-Sendfile headers?
> _______________________________________________
> 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/20110311/7c6bd0ab/attachment.htm


More information about the seaside mailing list