Avatar

Correct answer by
Level 1
Originally, I had problems w/ the file being placed in
C:/whatever.ext b/c I wasn't using relative paths.



This is the code I use:

--------------------------------



$MAXIMUM_FILESIZE = 1024 * 1024 * 2; // 2MB

$newFileLoc = "./wherever/file.jpg"



if ($_FILES['Filedata']['size'] <= $MAXIMUM_FILESIZE) {





move_uploaded_file($_FILES['Filedata']['tmp_name'],
"./temporary/".$_FILES['Filedata']['name']);



rename( "./temporary/".$_FILES['Filedata']['name'],
$newFileLoc );

chmod( $newFileLoc, 0777 );



}



---------------------------



Modified from this article by Adobe:




http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_...



View solution in original post