library/core/class.uploadimage.php
public function ValidateUpload($InputName, $ThrowError = TRUE) {
   
      if (!function_exists('gd_info'))
         throw new Exception(T('The uploaded file could not be processed because GD is not installed.'));
   
      // Make sure that all standard file upload checks are performed.
      $TmpFileName = parent::ValidateUpload($InputName, $ThrowError);
      
      // Now perform image-specific checks.
      if ($TmpFileName) {
         $Size = getimagesize($TmpFileName);
         if ($Size === FALSE)
            throw new Exception(T('The uploaded file was not an image.'));
      }
      
      return $TmpFileName;
   }
public function ValidateUpload($InputName, $ThrowError = TRUE) {
   
      if (!function_exists('gd_info'))
         throw new Exception(T('The uploaded file could not be processed because GD is not installed.'));
   
      // Make sure that all standard file upload checks are performed.
      $TmpFileName = parent::ValidateUpload($InputName, $ThrowError);
      
      // Now perform image-specific checks.
      if ($TmpFileName) {
         $Size = getimagesize($TmpFileName);
         if ($Size === FALSE)
            throw new Exception(T('The uploaded file was not an image.'));
      }
      
      return $TmpFileName;
   }
public function ValidateUpload ( $ InputName , $ ThrowError = TRUE ) { if ( ! function_exists ( 'gd_info' ) ) throw new Exception ( T ( 'The uploaded file could not be processed because GD is not installed.' ) ) ; // Make sure that all standard file upload checks are performed. $ TmpFileName = parent :: ValidateUpload ( $ InputName , $ ThrowError ) ; // Now perform image-specific checks. if ( $ TmpFileName ) { $ Size = getimagesize ( $ TmpFileName ) ; if ( $ Size === FALSE ) throw new Exception ( T ( 'The uploaded file was not an image.' ) ) ; } return $ TmpFileName ; }
Validates the uploaded image. Returns the temporary name of the uploaded file.
Validates the uploaded image . Returns the temporary name of the uploaded file .