downloading a file, rename it to php and returns the new name of Flex

Hello!

I download a file in Flex, but I want to rename the file in php.

However, I need flex for the new name of this file.

I thought I could echo this string to use in the event of upload.complete, but the goal comes with the real/old file name.

How can I get the file renamed?

It's my php:

<? PHP
$file = $_FILES ['Filedata'];
$tempFile = $file ["tmp_name"];
$fileName = $file ['name'];
$autoRename = SDAKJHASD.jpg

If ($file ['error'] is UPLOAD_ERR_OK)
{
move_uploaded_file ($tempFile, ".") / files / "." $autoRename);
echo $autoRename;  <- HOW TO RETRIEVE THIS STRING IN FLEX?

...
...
? >

Thank you!!!
CONSTRUCTION ~

http://livedocs.Adobe.com/Flash/9.0/ActionScriptLangRefV3/Flash/NET/FileReference.html#Eve nt:uploadCompleteData

Notice the 'data' part listed there.  Your function would seek to event.data for example.  You can send gross return strings, xml, or anything you want.

Tags: Flex

Similar Questions

Maybe you are looking for