<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's wrong is that it uses contentType:attachementWithFileName , whereas X-Accel-Redirect doesn't require these headers. Using these headers will confuse browsers into thinking that you're actually trying to download a file (without X-Sendfile redirection). This is why you get a file with 0 bytes - there'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"><<a href="mailto:aa@serendip.demon.co.uk">aa@serendip.demon.co.uk</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;">Thanks for looking at the headers. Here'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: 'Load' ]<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 <<a href="mailto:avishefi@gmail.com">avishefi@gmail.com</a>> wrote:<br>
<br>
</div><div class="im">> Amir,<br>
> The headers look fine. I'm interested in your code, specifically from where<br>
> you get a MultiByteFileStream.<br>
> 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>