2 Replies Latest reply on Aug 23, 2010 1:15 PM by Deh Bontempos

    uploading a file, renaming in php and returning new name to flex

    Deh Bontempos



      I upload a file to flex, but I want to rename the file in php.

      However I needed flex to know the new name of that file.


      I thought I could echo this string to use on the upload.complete event, but the target comes with the actual/old file name.

      How can I get the renamed file?


      this is my php:


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


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