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?
Note the "data" part listed there. Your function would be looking at event.data for instance. You can send back raw strings, xml, or whatever you want.
That is exactly that...
about the other thread, filling a datagrid with data from various tables..
I'm using a cascate method to get them all within flex, since I couldnt make the work in php.
in a table which requires ids from different tables, i grab one by one in sequence... it works, but still, looks like a workaround.