17 messages in ru.sysoev.nginxRe: [ANN] nginx_uploadprogress_module...
FromSent OnAttachments
Brice FigureauOct 3, 2007 8:49 am 
Ezra ZygmuntowiczOct 3, 2007 11:57 am 
Otto BretzOct 9, 2007 5:33 am 
Brice FigureauOct 9, 2007 6:46 am 
Brice FigureauOct 9, 2007 7:06 am.patch
Evan MillerOct 9, 2007 10:47 am 
Otto BretzOct 10, 2007 2:21 am 
Brice FigureauOct 10, 2007 6:14 am 
Otto BretzOct 11, 2007 4:55 am.zip
Brice FigureauOct 11, 2007 5:45 am 
Joerg DiekmannFeb 5, 2008 4:13 am 
Brice FigureauFeb 5, 2008 7:23 am 
Joerg DiekmannFeb 5, 2008 7:54 am 
Brice FigureauFeb 5, 2008 9:04 am 
Joerg DiekmannFeb 6, 2008 4:37 am 
Joerg DiekmannFeb 6, 2008 5:58 am 
Brice FigureauMay 6, 2008 2:38 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [ANN] nginx_uploadprogress_module v0.2Actions...
From:Brice Figureau (bric@public.gmane.org)
Date:Oct 11, 2007 5:45:01 am
List:ru.sysoev.nginx

On Thu, 2007-10-11 at 13:55 +0200, Otto Bretz wrote:

Brice Figureau wrote:

And it is now available :-) This time it should compile fine with nginx 0.6.x.

And it did! Though when I try it with the attached config I get this message: 2007/10/11 12:05:40 [error] 1347#0: *138 open() "/etc/nginx/html/progress" failed (2: No such file or directory), client: my.client.tld, server: my.server.tld, URL: "/progress", host: "my.server.tld", referrer: "http://my.server.tld/otto/upload.html"

To try it out I used a copy of the lighttpd upload page[1]. Is that ok? I compiled the module with-debug as well and have attached the log of an upload attempt.

The progress report handler doesn't yet support case-insentive progress id parameter (I know it sucks, but that's on my todo list for v0.3).

Apply this patch to your upload.html (provided it is the same as the file on the webpage you referenced):

--- upload.html.orig 2007-10-11 14:21:26.000000000 +0200 +++ upload.html 2007-10-11 14:21:36.000000000 +0200 @@ -40,7 +40,7 @@ if(!req) return;

req.open("GET", "/progress", 1); - req.setRequestHeader("X-Progress-Id", uuid); + req.setRequestHeader("X-Progress-ID", uuid); req.onreadystatechange = function () { if (!req) { window.clearTimeout(interval);

And then it will work fine.

If you are testing locally (ie the server is on the same computer or LAN as the client), you won't see the progress bar evolving, because the bandwidth is too high. If you try on a distant server with limited bandwidth it works fine, the progress bar is slowly increasing. If you want to see the progress evolving on localhost, I suggest you reduce interval_msec in upload.html to something like 150 or 200, otherwise the first /progress probe is sent after the upload has finished :-)

To test that the upload progress works fine, I'm using curl: To initiate the upload: curl -v -Ffilename=@file-to-upload --limit-rate 1k
"http://localhost/upload.html?X-Progress-ID=1234567890123456789019"

And to see the probe in action: curl -v -H'X-Progress-ID: 1234567890123456789019' "http://localhost/progress"

If you want to send me debug material, please send them privately and not on the list, that might annoy people not interested in our discussion...

Anyway, let me know if that's working for you, and do not hesitate to report any issues or improvements,