<div dir="ltr"><font color="#330033"><font size="2"><font face="tahoma,sans-serif">Amir,<br>The headers look fine. I'm interested in your code, specifically from where you get a MultiByteFileStream.<br>Could you elaborate please? maybe supply your code?<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 10:19 AM, 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;">Hi Avi<br>
<br>
WAFileLibrary mimetypeFor: is a better method, thanks! WAAnchorTag >> document:mimeType:fileName: doesn't seem to work with MultiByteFileStream; I get errors.<br>
<br>
In any case, with the current code, the response headers appear to be correct, so it probably indicates a problem with nginx. Just for reference, this is what I get from 'Transcript show: response headers':<br>
<br>
a WAHeaderFields('Content-Type'->'image/png' 'Content-Disposition'->'attachment; filename="/downloads/test.png"' 'X-Accel-Redirect'->'/downloads/test.png')<br>
<br>
I'll keep digging, just want to verify that I'm doing things properly on the Seaside end!<br>
<br>
Thanks,<br>
<br>
Amir<br>
<br>
<br>
<br>
On Thu, 10 Mar 2011 21:53:13 +0200<br>
<div class="im">Avi Shefi <<a href="mailto:avishefi@gmail.com">avishefi@gmail.com</a>> wrote:<br>
<br>
</div><div class="im">> As for the detection of mime types, why not use: WAFileLibrary mimetypeFor:<br>
> (aFilename copyAfterLast: $.)<br>
> The bug that MIMEDocument class>>#forURIReturnSingleMimeTypeOrDefault:<br>
> doesn't exist is associated with Pharo, not with Seaside (the class is in a<br>
> Pharo package named Network-MIME). You're invited to file a bug in the Pharo<br>
> issues list: <a href="http://code.google.com/p/pharo/issues/list" target="_blank">http://code.google.com/p/pharo/issues/list</a><br>
><br>
> As for the MultiByteFileStream - I looked around and I *think* WAAnchorTag<br>
> can accept a MultiByteFileStream, which is later on converted to a<br>
> WAMimeDocument. Have you given this a try?<br>
> In general, if you somehow managed to get a MultiByteFileStream, it means<br>
> that you should also hold the path to that file. So why not pass this path<br>
> to the nginx-related X-Sendfile headers?<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>