<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.12.1">
</HEAD>
<BODY>
hello,<BR>
<BR>
Sorry for my english...<BR>
<BR>
I have a Ruby on Rails site in production with Nginx 0.5.15 and 2 mongrel clusters. All work fine except the file download (streaming) and i don't know where does the problem come from (mongrel ? nginx ? rails ?)<BR>
<BR>
<BR>
In my view, I have the link : link_to "my_file", <BR>
{:controller=>"environnement", :action=>"download", :id=>"my_file"} <BR>
<BR>
<BR>
In the action of my controller environnement, I use the send_file method :<BR>
"public/my_file.pdf", :type => 'application/pdf' <BR>
<BR>
<BR>
In my browser, when I click on the download link pointing to the action, the browser window says that it is starting the download and after 30s it says<BR>
that the download is finished. <BR>
<BR>
<BR>
-> there is no progress bar in the download window of the browser. <BR>
<BR>
-> when the file is downloaded, the format isn't correct and the size of it is not what it should be<BR>
<BR>
-> it's work localy on my desktop in development mode<BR>
<BR>
-> it works if i use the direct link without the send_file method : http://www.my_site.com/my_file.pdf<BR>
<BR>
<BR>
Here the logs from production.log :<BR>
<BR>
<BR>
Processing EnvironnementController#download (for 82.247.51.xxx at <BR>
2007-07-31 17:27:03) [GET] <BR>
Session ID: 32b17304de1110d9aeebb602439fe056 <BR>
Parameters: {"action"=>"download", "id"=>"my_file", <BR>
"controller"=>"environnement"} <BR>
Completed in 0.00057 (1754 reqs/sec) | Rendering: 0.00006 (10%) | DB: <BR>
0.00000 (0%) | 200 OK <BR>
[<A HREF="http://www.mon_site.com/environnement/telecharger/mon_fichier">http://www.mon_site.com/environnement/download/my_file</A>] <BR>
Streaming file public/my_file.pdf <BR>
<BR>
<BR>
an idea ?<BR>
<BR>
<BR>
Jérémy. <BR>
<BR>
<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<BR>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>