====== upload ====== {#JAPI Joomla.Framework FileSystem JFile::upload #} Moves an uploaded file to a destination folder. ===== Syntax ===== boolean upload ( **$src**, **$dest** ) | **$src** | string | is a string containing the name of the PHP (temporary) uploaded file. | | **$dest** | string | is a string containing the path (including filename) to move the uploaded file to. | ===== Examples ===== Example: This example copies the temporary file sent in the upload variable. $file = JRequest::getVar( 'upload', '', 'file', 'array' ); if (!JFile::upload($file['tmp_name'], $destDir.strtolower($file['name']))) { echo "Upload failed!"; } else { echo "Upload complete!"; } NOTE: This example is taken from the admin.media.php file in the /administrator/components/com_media directory. This example did not work on the machine on which it was tested. ---- ~~DISCUSSION~~