On Sat, Nov 22, 2008 at 4:19 PM, Daniel Kinzler <[EMAIL PROTECTED]> wrote: > > > Does a PHP script using upload stuff get run if the file upload is complete, > > or will it start while still uploading? > > If not, can't you figure out the temporary name of the upload on the server > > and then run ls -lh on it? > > It gets run only after the upload is complete. And even if not, and you could > get the size of the temporary file, what would you do with it? You can't start > sending the response until the request is complete. And even if you could, the > browser would probably not start resinging it before it has finished sending > the > request (i.e. the upload). This is the nature of HTTP...
You could have the iframe script read its size and let the upload be handled by another frame (evil, evil, I know. But still, we can offer a fallback for people who have them disabled). Can you set PHP to name the temp upload files after an URL parameter? In this case, the Rapidshare approach would work. My approach would be then: 1) User loads [[Special:Upload]], upload id is created (here 31337 for example). Upload has two iframes in it: [[Special:Upload/Form/31337]] containing the <form>, and [[Special:Upload/Progress/31337]] containing the progress bar 2) User starts upload, Progress notices this via AJAX query (of course, this requires that one is able to set the tempfile's name, or at least know it!) and displays the bar 3) Upload finishes. Marco _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l