<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&gt;&gt;#forURIReturnSingleMimeTypeOrDefault: doesn&#39;t exist is associated with Pharo, not with Seaside (the class is in a Pharo package named Network-MIME). You&#39;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">&lt;<a href="mailto:ricardo.jacas@gmail.com">ricardo.jacas@gmail.com</a>&gt;</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 &lt;<a href="mailto:aa@serendip.demon.co.uk">aa@serendip.demon.co.uk</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hi Avi<br>
&gt;<br>
&gt; The path is accessible, and absolute.  I studied the nginx wiki very carefully, too.  It&#39;s an odd problem, because it WAS working properly in the past...<br>
&gt;<br>
&gt; I only noted the MultiByteFileStream because that&#39;s the file object when it&#39;s saved to the native filesystem; it&#39;s different from uploading a file to the image (which is what WAUploadFunctionalTest does).<br>

&gt;<br>
&gt;<br>
&gt; On Thu, 10 Mar 2011 10:46:33 +0200<br>
&gt; Avi Shefi &lt;<a href="mailto:avishefi@gmail.com">avishefi@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Amir,<br>
&gt;&gt; The path to the file should be:<br>
&gt;&gt; (a) accessible to the image you&#39;re running, and of course allowed by its<br>
&gt;&gt; file permissions.<br>
&gt;&gt; (b) generally an absolute path, however your nginx configuration might need<br>
&gt;&gt; a tweak to set this up. Maybe you&#39;re missing something that nginx requires?<br>
&gt;&gt; take a look: <a href="http://wiki.nginx.org/XSendfile" target="_blank">http://wiki.nginx.org/XSendfile</a><br>
&gt;&gt;<br>
&gt;&gt; Additionally, I don&#39;t understand why you&#39;re passing a MultiByteFileStream if<br>
&gt;&gt; all you need is the path to the file.<br>
&gt; _______________________________________________<br>
&gt; seaside mailing list<br>
&gt; <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
&gt; <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
&gt;<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>