This class provide all file upload functionalities
- Class name: Upload
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 9
- $_value
- $dirPath
- $errCode
- $errorCodes
- $errors
- $fileBaseName
- $fileExtension
- $fileName
- $filePath
- $fileSize
- $fileType
- $imgHandler
- $img_new_x
- $img_new_y
- $img_x
- $img_y
- $invalidFileExt
- $originalFileName
- $safeMode
- $uploadFileMode
- $validImageExts
- Upload
- _get_image_details
- _imageSave
- _resize
- deleteFileAndThumbs
- deleteUploadedFile
- displayError
- finish
- getDirPath
- getErrorCodeMsg
- getFileBaseName
- getFileExt
- getFileName
- getFilePath
- getFileSize
- getFileType
- getImageHeight
- getImageWidth
- getThumbInfo
- isFileUploaded
- isImage
- isPermittedFileExt
- isSizeTooBig
- moveUploadedFile
- resize
- setInvalidFileExt
public mixed $_value = null
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 25.
public mixed $dirPath = ""
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 26.
public mixed $errCode = ""
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 28.
public mixed $errorCodes = array(0 => 'the file uploaded with success', 1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini', 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', 3 => 'The uploaded file was only partially uploaded', 4 => 'No file was uploaded.', 6 => 'Missing a temporary folder', 7 => 'Failed to write file to disk', 8 => 'File upload stopped by extension', 999 => 'No error code avaiable')
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 31.
public mixed $errors = array()
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 24.
public mixed $fileBaseName = ""
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 20.
public mixed $fileExtension = ""
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 14.
public mixed $fileName = ""
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 13.
public mixed $filePath = ""
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 21.
public mixed $fileSize
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 22.
public mixed $fileType = ""
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 11.
public mixed $imgHandler = null
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 19.
public mixed $img_new_x
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 17.
public mixed $img_new_y
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 18.
public mixed $img_x
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 15.
public mixed $img_y
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 16.
public mixed $invalidFileExt = array()
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 27.
public mixed $originalFileName = ""
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 12.
public mixed $safeMode
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 29.
public mixed $uploadFileMode = 493
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 30.
public mixed $validImageExts = array("gif", "jpg", "png")
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 23.
mixed Upload::Upload()
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 44
void Upload::_get_image_details($image)
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 380
- $image mixed
boolean Upload::_imageSave(resource $newImageHandler, string $fileName, integer $quality)
save the thumbnail file and destroy the opened image
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 360
- $newImageHandler resource
- $fileName string
- $quality integer
\unknown Upload::_resize(string $fileName, integer $new_x, integer $new_y)
resize the image and return the thumbnail image details array("width"=>, "height"=>, "name")
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 318
- $fileName string
- $new_x integer - the thumbnail width
- $new_y integer - the thumbnail height
mixed Upload::deleteFileAndThumbs(string $dirPath, string $originalImageName, string $arrayThumbnailSuffix)
delete the uploaded image file & associated thumnails
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 562
- $dirPath string
- $originalImageName string
- $arrayThumbnailSuffix string
mixed Upload::deleteUploadedFile()
get the uploaded file
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 479
mixed Upload::displayError()
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 492
mixed Upload::finish()
destroy the tmp file
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 487
\unknown Upload::getDirPath()
return the directory path witch the file uploaded to
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 514
mixed Upload::getErrorCodeMsg()
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 71
mixed Upload::getFileBaseName()
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 519
mixed Upload::getFileExt()
get a file extension
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 173
mixed Upload::getFileName()
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 524
mixed Upload::getFilePath()
get the path which the file uploaded to
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 505
string Upload::getFileSize()
get uploaded file size
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 551
string Upload::getFileType()
get file type
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 164
integer Upload::getImageHeight()
get image height
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 542
integer Upload::getImageWidth()
get image width
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 533
array Upload::getThumbInfo(string $originalImageName, integer $originaleImageWidth, integer $originalImageHeight, string $thumbnailSuffix, integer $thumbnailWidth, integer $thumbnailHeight)
caculate the thumbnail details from the original image file
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 433
- $originalImageName string
- $originaleImageWidth integer
- $originalImageHeight integer
- $thumbnailSuffix string
- $thumbnailWidth integer
- $thumbnailHeight integer
mixed Upload::isFileUploaded($indexInPost)
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 49
- $indexInPost mixed
mixed Upload::isImage(mixed $invalidImageExts, boolean $delete)
check if the uploaded is permitted to upload
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 239
- $invalidImageExts mixed - invalid image extension
- $delete boolean - force to delete the uploaded file
boolean Upload::isPermittedFileExt(array $validFileExt)
check if the uploaded file extension is allowed against the validFile Extension or against the invalid extension list when the list of valid file extension is not set
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 82
- $validFileExt array
mixed Upload::isSizeTooBig(integer $maxSize)
check if the uploaded file size is too big
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 130
- $maxSize integer
\unknown Upload::moveUploadedFile(string $dest, string $fileBaseName, \unknown_type $overwrite)
move the uploaded file to a specific location
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 186
- $dest string - the path to the directory which the uploaded file will be moved to
- $fileBaseName string - the base name which the uploaded file will be renamed to
- $overwrite unknown_type
mixed Upload::resize($filePath, string $thumb_suffix, mixed $new_x, mixed $new_y)
Resize the Image in the X and/or Y direction If either is 0 it will be scaled proportionally
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 294
- $filePath mixed
- $thumb_suffix string
- $new_x mixed
- $new_y mixed
mixed Upload::setInvalidFileExt(array $invalidFileExt)
set the invali file extensions
- Visibility: public
- Source: admin-dev/ajaxfilemanager/inc/class.upload.php line 146
- $invalidFileExt array