ThomasJSmart
Programmer
- Sep 16, 2002
- 634
Hi have a question about the FileReference upload function.
I have a script that uploads a file in flash to my php server, the upload process all works great, progressbar is displaying, file is stored correctly, etc.
However the php script does not just store the upload and be done with it, it also does some file processing on the uploaded file that takes about as long as the upload itself.
The frontend result is that the progressbar goesfrom 0 to 100% and then sticks on 100% for another few minutes while the file is processed.
Now i have added a message that says "file is being processed" as soon as the % counter hits 100 so thats made it a bit more workable however idealy i would like to add more specific information about each processing step (there are a few), or even better: a second progressbar that shows the progress of the processing.
now in the processing php script i can output a number for each procent that gets done. so when finished the upload.php would look something like this in a browser:
1
2
3
4
5
6
7
etc.
each procent would appear in the document 1 by 1 (and not all at once when completed)
but.. HOW can i get this information into the Flash??? in my creative imagination there would be some kind of listener object attached to the upload... this checks the output of the upload.php file continuously for any message and then allows me to handle whatever text is returned in Flash... is this possible in the real world?
thank you
I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
I have a script that uploads a file in flash to my php server, the upload process all works great, progressbar is displaying, file is stored correctly, etc.
However the php script does not just store the upload and be done with it, it also does some file processing on the uploaded file that takes about as long as the upload itself.
The frontend result is that the progressbar goesfrom 0 to 100% and then sticks on 100% for another few minutes while the file is processed.
Now i have added a message that says "file is being processed" as soon as the % counter hits 100 so thats made it a bit more workable however idealy i would like to add more specific information about each processing step (there are a few), or even better: a second progressbar that shows the progress of the processing.
now in the processing php script i can output a number for each procent that gets done. so when finished the upload.php would look something like this in a browser:
1
2
3
4
5
6
7
etc.
each procent would appear in the document 1 by 1 (and not all at once when completed)
but.. HOW can i get this information into the Flash??? in my creative imagination there would be some kind of listener object attached to the upload... this checks the output of the upload.php file continuously for any message and then allows me to handle whatever text is returned in Flash... is this possible in the real world?
thank you
I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!