<div dir="ltr"><font color="#330033"><font size="2"><font face="tahoma,sans-serif">Amir,<br>Your code is fine, and works OK. The only thing that&#39;s wrong is that it uses contentType:attachementWithFileName , whereas X-Accel-Redirect doesn&#39;t require these headers. Using these headers will confuse browsers into thinking that you&#39;re actually trying to download a file (without X-Sendfile redirection). This is why you get a file with 0 bytes - there&#39;s no file contents in the transport.<br>
<br>You should use only contentType and X-Accel-Redirect to specify your file.<br><br><br>Cheers,<br>Avi.<br></font></font></font><br><div style="margin: 0pt;" name="sig_d41d8cd98f"></div><div class="gmail_quote">On Fri, Mar 11, 2011 at 12:12 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;">Thanks for looking at the headers.  Here&#39;s the rest of my code:<br>
<br>
renderUploadOn: html<br>
        html form multipart; with: [<br>
                html fileUpload callback: [ :f | self uploadFile: f ].<br>
                html submitButton text: &#39;Load&#39; ]<br>
<br>
uploadFile: aFile<br>
        file := (FileDirectory default directoryNamed: self filePath) assureExistence;<br>
                forceNewFileNamed: aFile fileName.<br>
        [ file binary; nextPutAll: aFile contents ]<br>
                ensure: [ file close ].<br>
        ^ file<br>
<br>
<br>
Amir<br>
<br>
<br>
On Fri, 11 Mar 2011 11:11:45 +0200<br>
<div class="im">Avi Shefi &lt;<a href="mailto:avishefi@gmail.com">avishefi@gmail.com</a>&gt; wrote:<br>
<br>
</div><div class="im">&gt; Amir,<br>
&gt; The headers look fine. I&#39;m interested in your code, specifically from where<br>
&gt; you get a MultiByteFileStream.<br>
&gt; Could you elaborate please? maybe supply your code?<br>
</div><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>