Class UploadHandlerPhoto
- UploadHandler
- UploadHandlerPhoto
License: GNU General Public License v2.0 only **********************************************************************************************
Brief:
Improved checks and update of database after upload of photos.
This class extends the UploadHandler of the jquery-file-upload library. After the upload of a photo we do some checks on the file and if no check fails then the Admidio database will be updated. If you want do upload files for the download module just create an instance of this class.
Class: UploadHandlerPhoto
Code:
// create object and do upload $uploadHandler = new UploadHandlerPhoto(array('upload_dir' => $uploadDir, 'upload_url' => $uploadUrl, 'image_versions' => array(), 'accept_file_types' => '/.(jpe?g|png)$/i'), true, 'array('accept_file_types' => $gL10n->get('PHO_PHOTO_FORMAT_INVALID'))); @endcode
Par: Examples
Located at uploadhandlerphoto.php
Methods summary
protected
stdClass
|
#
handle_file_upload( string $uploaded_file, string $name, integer $size, $type, $error, $index = null, $content_range = null )
Override the default method to handle the specific things of the photo module and update the database after file was succesful uploaded. This method has the same parameters as the default. |