views:

17

answers:

1

http://livedocs.adobe.com/flex/3/html/help.html?content=17_Networking_and_communications_7.html

When calling File.upload - how can the server communicate arbitrary information back about the upload? The Event.COMPLETE event that fires after upload only seems to contain a reference to the uploaded file, not any information that the server may have to deliver. I understand it is trivial to intercept ERROR messages, but what about non-error messages.

For instance: In the example on the page Adobe Flex 3 Help page above - for PHP an "echo" is issued.
echo exif_imagetype($_FILES['Filedata']); How could one "read" the results of that echo from Flex following a successful upload?

If "echo" isn't the right mechanism, how WOULD the server properly communicate non-error information BACK to flex after a successful upload?

I hope my question is clear enough.

+2  A: 

I believe that File.upload() will also result in a DataEvent.UPLOAD_COMPLETE_DATA event, which is the raw data sent back from the server (could be via echo(), or die()) after the upload is completed.

That might well give you what you need.

Stray