<div dir="ltr"><font color="#330033"><font size="2"><font face="tahoma,sans-serif">As for the detection of mime types, why not use: WAFileLibrary mimetypeFor: (aFilename copyAfterLast: $.)<br>The bug that </font></font></font><span style="color: rgb(51, 0, 51);">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: <a href="http://code.google.com/p/pharo/issues/list">http://code.google.com/p/pharo/issues/list</a><br>
<br>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?<br>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?<br>
<br><br>Avi.<br></span><br><div style="margin: 0pt;" name="sig_d41d8cd98f"></div><div class="gmail_quote">On Thu, Mar 10, 2011 at 7:29 PM, Ricardo Jacas <span dir="ltr"><<a href="mailto:ricardo.jacas@gmail.com">ricardo.jacas@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">i just dropped my code and used the function John said, but as AA says<br>
the file is represented as a MultiByteFileStream not a WAFile...any<br>
thoughts on how to work with that? or even make it a WAFile?<br>
<br>
<br>
<br>
2011/3/10 AA <<a href="mailto:aa@serendip.demon.co.uk">aa@serendip.demon.co.uk</a>>:<br>
<div><div></div><div class="h5">> Hi Avi<br>
><br>
> 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...<br>
><br>
> 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).<br>
><br>
><br>
> On Thu, 10 Mar 2011 10:46:33 +0200<br>
> Avi Shefi <<a href="mailto:avishefi@gmail.com">avishefi@gmail.com</a>> wrote:<br>
><br>
>> Amir,<br>
>> The path to the file should be:<br>
>> (a) accessible to the image you're running, and of course allowed by its<br>
>> file permissions.<br>
>> (b) generally an absolute path, however your nginx configuration might need<br>
>> a tweak to set this up. Maybe you're missing something that nginx requires?<br>
>> take a look: <a href="http://wiki.nginx.org/XSendfile" target="_blank">http://wiki.nginx.org/XSendfile</a><br>
>><br>
>> Additionally, I don't understand why you're passing a MultiByteFileStream if<br>
>> all you need is the path to the file.<br>
> _______________________________________________<br>
> seaside mailing list<br>
> <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
><br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
lets reign all together<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</div></div></blockquote></div><br></div>