On Thu, 11 Nov 2010 17:23:30 +0000 Scott Dolan <sdo...@v12groupinc.com> wrote: > My problem is that Apache/mod_perl does not > start to return anything unitl it has received the whole file.
Just to keep everything clear on this, it's NOT a mod_perl issue, it is definitely a mason issue. Via apache/mod_perl you can access the HTTP request before it is handled (hence: before the upload even begins). However, evidently you cannot if you are accessing the request via mason. Remember, "$r", the request object, is instantiated by mason (altho it's content is provided by other mod_perl modules). I do not know anything about the internals but presume this has to do with where mason fits itself into the apache request cycle. The request cycle has about 11 consecutive points that mod_perl can hook into. I believe mason starts on the 9th one, meaning the request is completed, which is why this issue exists. I tried a couple of things. It is not possible to do a true AJAX upload under any circumstances, altho there are ways to spoof one using "hidden iframes" as Bill Walz discusses. There is a jQuery plugin to do that, but I did not try it out and cannot say for sure if the requestHeaders you could check client side would contain the real Content-length (I doubt it). I also tried setting the form method to HEAD to see if you can get the Content-length without the content, that is not possible either. So I think this is just plain impossible unless you use some non-mason stuff server side, a few people here seem to have working solutions that way. You could still do a "bytes so far", by using a setInterval ajax routine which gets the form.field.value onsubmit for the filename and polls the server every second. If you think that's okay, you can stick to mason server side. But because you cannot get the file's size client side, and you cannot get it in mason server side until it's done, you cannot compute any "% done". -- "The angel of history[...]is turned toward the past." (Walter Benjamin) ------------------------------------------------------------------------------ Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users