<div dir="ltr"><font color="#330033"><font size="2"><font face="tahoma,sans-serif">Amir,<br>The path to the file should be:<br>(a) accessible to the image you&#39;re running, and of course allowed by its file permissions.<br>
(b) generally an absolute path, however your nginx configuration might need a tweak to set this up. Maybe you&#39;re missing something that nginx requires? take a look: <a href="http://wiki.nginx.org/XSendfile">http://wiki.nginx.org/XSendfile</a><br>
<br>Additionally, I don&#39;t understand why you&#39;re passing a MultiByteFileStream if all you need is the path to the file.<br><br><br>Avi.<br></font></font></font><br><div style="margin: 0pt;" name="sig_d41d8cd98f"></div>
<div class="gmail_quote">On Wed, Mar 9, 2011 at 9:41 PM, AA <span dir="ltr">&lt;<a href="mailto:aa@serendip.demon.co.uk">aa@serendip.demon.co.uk</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 experimented exhaustively with this just recently; it simply doesn&#39;t work when I have files stored on my OS&#39;s native filesystem.  And I MUST apologise, because I didn&#39;t get around to filing a bug report.  (Sorry!)<br>

<br>
First of all, there&#39;s no method forURIReturnSingleMimeTypeOrDefault:, which is called by MIMEDocument class &gt;&gt; guessTypeFromName: url, which is in turn called when trying to determine the file MIME type.<br>
<br>
I did my downloads like this (note: &#39;aFile&#39; is a MultiByteFileStream:):<br>
<br>
        html anchor<br>
                callback: [ self downloadFile: aFile ];<br>
                with: aFile localName.<br>
<br>
downloadFile: aFile<br>
        self requestContext respond: [ :response |<br>
                response<br>
                        contentType: (MIMEType forFileNameReturnSingleMimeTypeOrDefault: aFile localName);<br>
                        attachmentWithFileName: aFile fullName;<br>
                        headerAt: &#39;X-Accel-Redirect&#39;<br>
                        put: aFile name ]<br>
<br>
I&#39;m using nginx as my webserver, so the &#39;X-Accel-Redirect&#39; is the equivalent for the standard &#39;X-SendFile&#39; header.<br>
<br>
Now, this worked nicely in the past, but since I&#39;ve upgraded to the latest Seaside 3.0.4, I&#39;m having some problems...  So right now I&#39;m debugging to find out what&#39;s going on (could be a misconfigured webserver, of course).<br>

<br>
Amir<br>
<br>
<br>
<br>
On Wed, 9 Mar 2011 11:25:59 -0500<br>
John McKeon &lt;<a href="mailto:p3anoman@gmail.com">p3anoman@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Ricardo,<br>
&gt;<br>
&gt;  You can use WAAnchorTag&gt;&gt;#document:mimeType:fileName: to render a download<br>
&gt; link.<br>
&gt; Have a look at the code for WAUploadFunctionalTest&gt;&gt;#renderDownloadLinksOn:<br>
&gt; to see how it is used.<br>
&gt; (If you look at the test in the browser, you will have to upload a file<br>
&gt; first before you will see the download links rendered)<br>
&gt;<br>
&gt; Hope this helps<br>
&gt; John<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>
</blockquote></div><br></div>