views:

1228

answers:

3

Is there any way to track the status of a posted upload in AS3? There is a ProgressEvent, but it gives data back about the response, not the actual POST upload. I'm posting binary data for an image, so it's usually in the 50-100kb range.

The image data was generated inside Flash itself, so I can't use the upload method - at least as far as I know.

Thanks!

+1  A: 

Perhaps you can use a function at the server side to send progress events to the flash object?

Eliram
Looks like this'll be built into PHP 5.2: http://www.ibm.com/developerworks/library/os-php-v525/index.htmlI'll give that a try, thanks!
UltimateBrent
A: 

Take a look at the FileReference class. The progress event in it will give you data about the upload:

Dispatched periodically during the file upload or download operation. The progress event is dispatched while Flash Player transmits bytes to a server, and it is periodically dispatched during the transmission, even if the transmission is ultimately not successful. To determine if and when the file transmission is actually successful and complete, listen for the complete event.

81bronco
Won't work, FileReference.upload() can only be called after finding a local file with browse(). I have generated the data inside Flash, so I can't attach it to a FileReference.Thanks though, I'm beginning to think it isn't possible. :(
UltimateBrent
+1  A: 

He's not asking about the filereference list..

He has the same problem that I have, there's not a method to have a post data transfer progress. I think that the only way is that one suggested above, sending from PHP to flash a progressEvent checking the size of the data received (If it is possible..);

Bye