\Kendo\UI\UploadAsync

A PHP class representing the async setting of Upload.

Methods

autoRetryAfter

If you set the property, the failed upload request is repeated after the declared amount of miliseconds.

Returns

\Kendo\UI\UploadAsync

Parameters

$value float

Example

<?php
$async = new \Kendo\UI\UploadAsync();
$async->autoRetryAfter(1);
?>

autoUpload

The selected files will be uploaded immediately by default. You can change this behavior by setting autoUpload to false.

Returns

\Kendo\UI\UploadAsync

Parameters

$value boolean

Example

<?php
$async = new \Kendo\UI\UploadAsync();
$async->autoUpload(true);
?>

batch

The selected files will be uploaded in separate requests, if this is supported by the browser. You can change this behavior by setting batch to true, in which case all selected files will be uploaded in one request.The batch mode applies to multiple files, which are selected at the same time. Files selected one after the other will be uploaded in separate requests.

Returns

\Kendo\UI\UploadAsync

Parameters

$value boolean

Example

<?php
$async = new \Kendo\UI\UploadAsync();
$async->batch(true);
?>

chunkSize

When the property is set, the selected files are uploaded with the declared size chunk by chunk. Each request sends a separate file blob and additional string metadata to the server. This metadata is in a stringified JSON format and contains the chunkIndex, contentType, totalFileSize, totalChunks, uploadUid properties. These properties enable the validation and combination of the file on the server side. The response also returns a JSON object with the uploaded and fileUid properties, which notifies the client what is the next chunk.You can use this property only when async.batch is set to false.

Returns

\Kendo\UI\UploadAsync

Parameters

$value float

Example

<?php
$async = new \Kendo\UI\UploadAsync();
$async->chunkSize(1);
?>

concurrent

By default, the selected files are uploaded one after another. When set to true, all selected files start uploading simultaneously.This property is available when the async.chunkSize is set.

Returns

\Kendo\UI\UploadAsync

Parameters

$value boolean

Example

<?php
$async = new \Kendo\UI\UploadAsync();
$async->concurrent(true);
?>

maxAutoRetries

Sets the maximum number of attempts that are performed if an upload fails.The property is only used when the async.autoRetryAfter property is also defined.

Returns

\Kendo\UI\UploadAsync

Parameters

$value float

Example

<?php
$async = new \Kendo\UI\UploadAsync();
$async->maxAutoRetries(1);
?>

removeField

The name of the form field submitted to the Remove URL.

Returns

\Kendo\UI\UploadAsync

Parameters

$value string

Example

<?php
$async = new \Kendo\UI\UploadAsync();
$async->removeField('value');
?>

removeUrl

The URL of the handler responsible for removing uploaded files (if any). The handler must accept POST requests containing one or more "fileNames" fields specifying the files to be deleted.

Returns

\Kendo\UI\UploadAsync

Parameters

$value string

Example

<?php
$async = new \Kendo\UI\UploadAsync();
$async->removeUrl('value');
?>

removeVerb

The HTTP verb to be used by the remove action.

Returns

\Kendo\UI\UploadAsync

Parameters

$value string

Example

<?php
$async = new \Kendo\UI\UploadAsync();
$async->removeVerb('value');
?>

saveField

The name of the form field submitted to the save URL. The default value is the input name.

Returns

\Kendo\UI\UploadAsync

Parameters

$value string

Example

<?php
$async = new \Kendo\UI\UploadAsync();
$async->saveField('value');
?>

saveUrl

The URL of the handler that will receive the submitted files. The handler must accept POST requests containing one or more fields with the same name as the original input name.

Returns

\Kendo\UI\UploadAsync

Parameters

$value string

Example

<?php
$async = new \Kendo\UI\UploadAsync();
$async->saveUrl('value');
?>

useArrayBuffer

By default, the files are uploaded as filedata. When set to true, the files are read as file buffer by using FileReader and this buffer is send in the request body.

Returns

\Kendo\UI\UploadAsync

Parameters

$value boolean

Example

<?php
$async = new \Kendo\UI\UploadAsync();
$async->useArrayBuffer(true);
?>

withCredentials

Controls whether to send credentials (cookies, headers) for cross-site requests. This option will be ignored if the browser doesn't support File API.

Returns

\Kendo\UI\UploadAsync

Parameters

$value boolean

Example

<?php
$async = new \Kendo\UI\UploadAsync();
$async->withCredentials(true);
?>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve the information

close
Dummy