FileReference and HttpService Browse Image Modify it then Upload it

Posted by user177787 on Stack Overflow See other posts from Stack Overflow or by user177787
Published on 2009-09-23T16:16:42Z Indexed on 2010/04/25 20:33 UTC
Read the original article Hit count: 277

Filed under:
|
|
|
|

Hello,

I am trying to do an image uploader, user can: - browse local file with button.browse - select one and save it as a FileReference. - then we do FileReference.load() then bind the data to our image control. - after we make a rotation on it and change the data of image. - and to finish we upload it to a server.

To change the data of image i get the matrix of the displayed image and transform it then i re-use the new matrix and bind it to my old image:

private function TurnImage():void
{

//Turn it var m:Matrix = _img.transform.matrix; rotateImage(m); _img.transform.matrix = m; }

Now the mater is that i really don't know how to send the data as a file to my server cause its not stored in the FileReference and data inside FileReference is readOnly so we can't change it or create a new, so i can't use .upload();.

Then i tried HttpService.send but i can't figure out how you send a file and not a mxml.

© Stack Overflow or respective owner

Related posts about flex

Related posts about gumbo