Source for file upload.php
Documentation is available at upload.php
// Copyright (C) 2009 by Ronnie Garcia
// Co-developed by Travis Nickels
include('../../../../config.php');
$tempFile =
$_FILES['Filedata']['tmp_name'];
$targetPath =
$CFG->dataroot.
'/'.
SITEID.
'/presenter/'.
$_GET["moduleId"].
'/';
//Server side security check
$allowable =
array ('.jpg','.gif','.png','.htm','html','.mov');
//get the extension of the file being uploaded
// Give it a try with this tiny extensionckeck
foreach( $allowable as $ext ) {
if(!$noMatch){ // an evil upload was attempted by an evil avatar!!!
echo
"This file is not allowed...";
else { //oh, its a good avatar uploading good files
Documentation generated on Fri, 17 Jul 2009 11:02:35 +0100 by phpDocumentor 1.4.0