A builder class for IUploadAsyncSettings
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class UploadAsyncSettingsBuilder
Inheritance: objectUploadAsyncSettingsBuilder
Inherited Members
Constructors
Initializes a new instance of the UploadAsyncSettingsBuilder class.
public UploadAsyncSettingsBuilder(IUploadAsyncSettings asyncSettings)
The async settings.
Methods
If the property is set the failed upload request will be repeated after the declared amount of ticks.
public UploadAsyncSettingsBuilder AutoRetryAfter(double value)
The value for AutoRetryAfter
Returns:Sets a value indicating whether to start the upload immediately after selecting a file
public UploadAsyncSettingsBuilder AutoUpload(bool value)
true if the upload should start immediately after selecting a file, false otherwise; true by default
Returns:Sets a value indicating whether to upload selected files in one batch (request)
public UploadAsyncSettingsBuilder Batch(bool value)
true if the files should be uploaded in a single request, false otherwise; false by default
Returns:When the property is set the selected files will be uploaded chunk by chunk with the declared size. Each request sends a separate file blob and additional string metadata to the server. This metadata is a stringified JSON and contains chunkIndex, contentType, totalFileSize, totalChunks, uploadUid properties that allow validating and combining the file on the server side. The response also returns a JSON object with uploaded and fileUid properties that notifies the client which should be the next chunk.
public UploadAsyncSettingsBuilder ChunkSize(double value)
The value for ChunkSize
Returns:By default the selected files are uploaded one after another. When set to 'true' all the selected files start uploading simultaneously. (The property is available when the async.chunkSize is set.)
By default the selected files are uploaded one after another. When set to 'true' all the selected files start uploading simultaneously. (The property is available when the async.chunkSize is set.)
public UploadAsyncSettingsBuilder Concurrent(bool value)
The value for Concurrent
Returns:It sets the number of attempts that will be performed if an upload is failing. The property is only used when the async.autoRetryAfter property is also defined.
public UploadAsyncSettingsBuilder MaxAutoRetries(double value)
The value for MaxAutoRetries
Returns:Sets the route values for the remove operation
public UploadAsyncSettingsBuilder Remove(RouteValueDictionary routeValues)
The route values of the action method.
Returns:Sets the route and values for the remove operation
public UploadAsyncSettingsBuilder Remove(string routeName, RouteValueDictionary routeValues)
Name of the route.
routeValuesRouteValueDictionaryThe route values.
Returns:Sets the action, controller and route values for the remove operation
Sets the action, controller and route values for the remove operation
Sets the route name for the remove operation
public UploadAsyncSettingsBuilder Remove(string routeName)
Name of the route.
Returns:Sets the action for the remove operation
public UploadAsyncSettingsBuilder Remove<TController>(Expression<Action<TController>> controllerAction) where TController : Controller
The action.
Returns:Sets the field name for the remove operation
public UploadAsyncSettingsBuilder RemoveField(string fieldName)
The form field name to use for submiting the files. "fileNames" is used if not set.
Returns:Sets an absolute or relative Remove action URL. Note that the URL must be in the same domain for the operation to succeed.
public UploadAsyncSettingsBuilder RemoveUrl(string url)
The Remove action URL.
Returns:Sets the route values for the save operation
public UploadAsyncSettingsBuilder Save(RouteValueDictionary routeValues)
The route values of the action method.
Returns:Sets the route and values for the save operation
public UploadAsyncSettingsBuilder Save(string routeName, RouteValueDictionary routeValues)
Name of the route.
routeValuesRouteValueDictionaryThe route values.
Returns:Sets the action, controller and route values for the save operation
Sets the action, controller and route values for the save operation
Sets the route name for the save operation
public UploadAsyncSettingsBuilder Save(string routeName)
Name of the route.
Returns:Sets the action for the save operation
public UploadAsyncSettingsBuilder Save<TController>(Expression<Action<TController>> controllerAction) where TController : Controller
The action.
Returns:Sets the field name for the save operation
public UploadAsyncSettingsBuilder SaveField(string fieldName)
The form field name to use for submiting the files. The Upload name is used if not set.
Returns:Sets an absolute or relative Save action URL. Note that the URL must be in the same domain for the upload to succeed.
public UploadAsyncSettingsBuilder SaveUrl(string url)
The Save action URL.
Returns: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.
public UploadAsyncSettingsBuilder UseArrayBuffer(bool useArrayBuffer)
true if arrayBuffer should be send; false by default
Returns:Sets a value indicating whether to send credentials (cookies, headers) for cross-site requests.
public UploadAsyncSettingsBuilder WithCredentials(bool withCredentials)
true if credentials should be sent, false otherwise; true by default
Returns: