views:

2573

answers:

8

I am developing image uploader in Flash. I use FileReference.browse to browse image then resize this image to 1000 x 1000 px, if the image is very big and then upload to server. I want to show progressbar for the image upload progress.

I am usinng URLLoader to send binary data of the resized images, but ProgressEvent on URLLoader doesn't work the way it is supposed to work. It is fired only after the image is completed uploaded instead of showing intermediate progress. ProgressEvent on FileReference works perfectly to show intermediate image upload progress.

Is there a way to display upload progress using URLLoader? or

Can we use FileReference to load modified image and then call FileReference.upload, that way it will be possible to show actual progress bar.

Thanks.

A: 

Use FileReference.upload, that's specifically what that method is for, and you will have your progress indicator.

JStriedl
A: 

But my problem is that I am resizing the browsed image after using FileReference.browse, and I want to upload resized images, not the original picture in FileReference object after browse. How do I use Filereference.upload in this case? Filereference.upload will upload original image not the resized one. Any idea, how to put the resized image into Filereference object and then use FileReference.upload.

Neeraj Khanna
Can you not create a dummy file reference once you've resized the image or even create a temporary file (if it's possible?)
widgisoft
A: 

Not able to set data in dummy FileReference, data is read-only property.

neeraj Khanna
A: 

But this has same problem of not showing image upload progress, from the above link:

"Unfortunately there is a problem getting progress event. We cant show any progress during sending data to server because flash doesn't support it"

I am exactly looking for a solution for the above issue. URLLoader works fine to post the image data.

Neeraj
A: 

I'm having the same problem. I use URLLoader te upload a modified image but I need to show progress feedback about the upload to the user. Does anyone know a solution to use URLLoader and show the feedback process??

Erik de Jong
A: 

@ Neeraj.. Hey neeraj did u got any solution for the problem??

please add me in u r gtalk, I am also facing similar problems.. as u have discovered this problem long so might have discovered the solution of it as well :)

my email id is [email protected]

Thanks a Ton -Srinivas

Divakarla Srinivas