Hi, I'm selecting a file from computer via FileReference.browse and then resize selected image, if its dimensions are too big.
Then I'm uploading it to the server by UrlLoader. It works fine, but I'm not able to display progressbar. Is there any possibility to do so?
I was thinking about putting the data back to FileReference, but unfortunately, property "data" is read-only.
Have you handled the upload progress. Try using -
private function progressHandler(event:ProgressEvent):void
var file:FileReference = FileReference(event.target);
trace("progressHandler name=" + file.name + " bytesLoaded=" + event.bytesLoaded + " bytesTotal=" + event.bytesTotal);
Instead of the trace statement, you can use those values in the UI showing the progress status. Also you can calculate the percentage from the bytesLoaded and bytesTotal properties of ProgressEvent. I hope this helps
Hi, thanks for reply, but I can't use FileReference, because data from client PC were modified before uploading it to server.