file uploads and progress monitoring on on-rev(reposted )
andre at andregarzia.com
Mon Nov 29 10:37:44 CST 2010
Lots of things happening here.
$_SERVER variable is ONLY AVAILABLE for RevServer which is exactly what you
$_POST_RAW just means you are accessing the stuff in the standard input in
its original form, you need this when you must recreate data on the correct
order since $_POST will not preserver order or when you need to do MIME
Decoding which is the case of file uploads.
Now on the topic of file upload progress, the quick answer is no. You can't
provide your page with a file upload progress bar if you are using an simple
HTML Form for the file upload. If you built your web page and use something
along the lines of:
<input type="file" ... />
Then you can't check for progress. The web is stateless. When your client is
uploading data, your server can't modify what your client is seeing. That is
not how it works.
You will say that gmail and other guys show you a progress bar. How they do
it? They cheat. Most of these guys are using a hidden adobe flash component
to do the upload and inform back the progress or even worse, all the upload
interface thing is a flash blob. This approach involves using two additional
could use a hidden iframe with a form and then submit the form, while the
content is read by your server you could write the progress somewhere and
an eternity debugging it for all browsers.
More information about the use-livecode