\Kendo\UI\FileManagerUpload
A PHP class representing the upload setting of FileManager.
Methods
async
Configures the asynchronous upload of files. For more details, refer to the article on the async mode of the Upload.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\UI\FileManagerUploadAsync|array
Example - using \Kendo\UI\FileManagerUploadAsync
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$async = new \Kendo\UI\FileManagerUploadAsync();
$autoRetryAfter = 1;
$async->autoRetryAfter($autoRetryAfter);
$upload->async($async);
?>
Example - using array
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$autoRetryAfter = 1;
$upload->async(array('autoRetryAfter' => $autoRetryAfter));
?>
cancel
Fires when the upload was cancelled while in progress. Upload Events.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\JavaScriptFunction
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->cancel(new \Kendo\JavaScriptFunction('function() { }'));
?>
clear
Fires when the files are cleared by clicking on the Clear button. Upload Events.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\JavaScriptFunction
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->clear(new \Kendo\JavaScriptFunction('function() { }'));
?>
complete
Fires when all active uploads complete—either successfully or with errors. Upload Events.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\JavaScriptFunction
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->complete(new \Kendo\JavaScriptFunction('function() { }'));
?>
directory
Enables the selection of folders instead of files.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value boolean
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->directory(true);
?>
error
Fires when an upload or remove operation fails. Upload Events.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\JavaScriptFunction
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->error(new \Kendo\JavaScriptFunction('function() { }'));
?>
localization
Sets the strings rendered by the Upload.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\UI\FileManagerUploadLocalization|array
Example - using \Kendo\UI\FileManagerUploadLocalization
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$localization = new \Kendo\UI\FileManagerUploadLocalization();
$cancel = 'value';
$localization->cancel($cancel);
$upload->localization($localization);
?>
Example - using array
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$cancel = 'value';
$upload->localization(array('cancel' => $cancel));
?>
multiple
Enables (if set to true
) or disables (if set to false
) the selection of multiple files. If set to false
, the user can select only one file at a time.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value boolean
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->multiple(true);
?>
pause
Fires when the files are cleared by clicking the Pause button. The button is visible if chunksize is set. Upload Events.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\JavaScriptFunction
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->pause(new \Kendo\JavaScriptFunction('function() { }'));
?>
progress
Fires when the data about the progress of the upload is available. Upload Events.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\JavaScriptFunction
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->progress(new \Kendo\JavaScriptFunction('function() { }'));
?>
remove
Fires when an uploaded file is about to be removed. If the event is canceled, the remove operation is prevented. Upload Events.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\JavaScriptFunction
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->remove(new \Kendo\JavaScriptFunction('function() { }'));
?>
resume
Fires when the files are resumed through clicking the Resume button. The button is visible if chunksize is set and the file upload is paused. Upload Events.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\JavaScriptFunction
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->resume(new \Kendo\JavaScriptFunction('function() { }'));
?>
select
Fires when a file is selected. Upload Events.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\JavaScriptFunction
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->select(new \Kendo\JavaScriptFunction('function() { }'));
?>
showFileList
Enables (if set to true
) or disables (if set to false
) the display of a file listing for the file upload. The disabling of a file listing might be useful if you want to customize the UI. To build your own UI, use the client-side events.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value boolean
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->showFileList(true);
?>
success
Fires when an upload or remove operation is completed successfully. Upload Events.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\JavaScriptFunction
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->success(new \Kendo\JavaScriptFunction('function() { }'));
?>
upload
Fires when one or more files are about to be uploaded. The canceling of the event prevents the upload. Upload Events.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\JavaScriptFunction
Example
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$upload->upload(new \Kendo\JavaScriptFunction('function() { }'));
?>
validation
Configures the validation options for uploaded files.
Returns
\Kendo\UI\FileManagerUpload
Parameters
$value \Kendo\UI\FileManagerUploadValidation|array
Example - using \Kendo\UI\FileManagerUploadValidation
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$validation = new \Kendo\UI\FileManagerUploadValidation();
$maxFileSize = 1;
$validation->maxFileSize($maxFileSize);
$upload->validation($validation);
?>
Example - using array
<?php
$upload = new \Kendo\UI\FileManagerUpload();
$maxFileSize = 1;
$upload->validation(array('maxFileSize' => $maxFileSize));
?>