[Seaside] Making a download page

Avi Shefi avishefi at gmail.com
Thu Mar 10 19:53:13 UTC 2011


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?


Avi.

On Thu, Mar 10, 2011 at 7:29 PM, Ricardo Jacas <ricardo.jacas at gmail.com>wrote:

> i just dropped my code and used the function John said, but as AA says
> the file is represented as a MultiByteFileStream not a WAFile...any
> thoughts on how to work with that? or even make it a WAFile?
>
>
>
> 2011/3/10 AA <aa at serendip.demon.co.uk>:
> > Hi Avi
> >
> > The path is accessible, and absolute.  I studied the nginx wiki very
> carefully, too.  It's an odd problem, because it WAS working properly in the
> past...
> >
> > I only noted the MultiByteFileStream because that's the file object when
> it's saved to the native filesystem; it's different from uploading a file to
> the image (which is what WAUploadFunctionalTest does).
> >
> >
> > On Thu, 10 Mar 2011 10:46:33 +0200
> > Avi Shefi <avishefi at gmail.com> wrote:
> >
> >> Amir,
> >> The path to the file should be:
> >> (a) accessible to the image you're running, and of course allowed by its
> >> file permissions.
> >> (b) generally an absolute path, however your nginx configuration might
> need
> >> a tweak to set this up. Maybe you're missing something that nginx
> requires?
> >> take a look: http://wiki.nginx.org/XSendfile
> >>
> >> Additionally, I don't understand why you're passing a
> MultiByteFileStream if
> >> all you need is the path to the file.
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
>
>
>
> --
> lets reign all together
> _______________________________________________
> 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/20110310/122e908b/attachment.htm


More information about the seaside mailing list