angerbee
03-15-2009, 11:00 PM
I am trying to create a Flex app that will allow the user to browse their computer for an image, then upload the image to the server.
I need to send this image to a PHP page that will require 2 other POST items (an order # and a password) along with the image that is then renamed and saved. The PHP page then echos the new file name back to Flex so that I can record it.
The locally running Flex app will then create an Image with the FileReference data to be manipulated locally:
var i:Image = new Image();
i.source = fileref.data;
However, I need the url of the uploaded image so that it can be referenced in an XML string that will later be uploaded so that the whole stage can be recreated on the server side.
So when I look at using FileReference.upload(URLRequest), I don't see how I can include the other variables I need, but when I use HTTPService, I can't tell what is happening when I do
httpsrv.send({id: id, pwd: pwd, img: fileref.data});
I need to send this image to a PHP page that will require 2 other POST items (an order # and a password) along with the image that is then renamed and saved. The PHP page then echos the new file name back to Flex so that I can record it.
The locally running Flex app will then create an Image with the FileReference data to be manipulated locally:
var i:Image = new Image();
i.source = fileref.data;
However, I need the url of the uploaded image so that it can be referenced in an XML string that will later be uploaded so that the whole stage can be recreated on the server side.
So when I look at using FileReference.upload(URLRequest), I don't see how I can include the other variables I need, but when I use HTTPService, I can't tell what is happening when I do
httpsrv.send({id: id, pwd: pwd, img: fileref.data});