Defines the fluent API for configuring UploadAsyncSettings
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class UploadAsyncSettingsBuilder
Inheritance: objectUploadAsyncSettingsBuilder
Inherited Members
Constructors
UploadAsyncSettingsBuilder method.
public UploadAsyncSettingsBuilder(UploadAsyncSettings container)
Properties
Gets the settings being configured.
protected UploadAsyncSettings Container { get; }
Methods
If async.autoRetryAfter is set, the failed upload request is repeated after the declared amount of time in miliseconds.
public UploadAsyncSettingsBuilder AutoRetryAfter(double value)
The value for AutoRetryAfter
Returns:Returns the current UploadAsyncSettingsBuilder instance.
By default, the selected files are uploaded immediately. To change this behavior, set autoUpload to false.
public UploadAsyncSettingsBuilder AutoUpload(bool value)
The value for AutoUpload
Returns:Returns the current UploadAsyncSettingsBuilder instance.
By default and if supported by the browser, the selected files are uploaded in separate requests. To change this behavior, set batch to true. As a result, all selected files are uploaded in one request.The batch mode applies to multiple files which are selected simultaneously. Files that are selected one after the other are uploaded in separate requests.
public UploadAsyncSettingsBuilder Batch()
Returns the current UploadAsyncSettingsBuilder instance.
By default and if supported by the browser, the selected files are uploaded in separate requests. To change this behavior, set batch to true. As a result, all selected files are uploaded in one request.The batch mode applies to multiple files which are selected simultaneously. Files that are selected one after the other are uploaded in separate requests.
public UploadAsyncSettingsBuilder Batch(bool value)
The value for Batch
Returns:Returns the current UploadAsyncSettingsBuilder instance.
When async.chunkSize is set, the selected files are 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 in a stringified JSON format and contains the fileName, relativePath, chunkIndex, contentType, totalFileSize, totalChunks, and 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 the next chunk is.
public UploadAsyncSettingsBuilder ChunkSize(double value)
The value for ChunkSize
Returns:Returns the current UploadAsyncSettingsBuilder instance.
By default, the selected files are uploaded one after the other. When async.concurrent is set to true, all selected files start to upload simultaneously.
public UploadAsyncSettingsBuilder Concurrent()
Returns the current UploadAsyncSettingsBuilder instance.
By default, the selected files are uploaded one after the other. When async.concurrent is set to true, all selected files start to upload simultaneously.
public UploadAsyncSettingsBuilder Concurrent(bool value)
The value for Concurrent
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the maximum number of attempts that are performed if an upload fails.
public UploadAsyncSettingsBuilder MaxAutoRetries(double value)
The value for MaxAutoRetries
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the route values for the remove operation
public UploadAsyncSettingsBuilder Remove(RouteValueDictionary routeValues)
The route values of the action method.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the route and values for the remove operation
public UploadAsyncSettingsBuilder Remove(string routeName, object routeValues)
Name of the route.
routeValuesobjectThe route values.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the route and values for the remove operation
public UploadAsyncSettingsBuilder Remove(string routeName, RouteValueDictionary routeValues)
Name of the route.
routeValuesRouteValueDictionaryThe route values.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the action, controller and route values for the remove operation
public UploadAsyncSettingsBuilder Remove(string actionName, string controllerName, object routeValues)
Name of the action.
controllerNamestringName of the controller.
routeValuesobjectThe route values.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the action, controller and route values for the remove operation
public UploadAsyncSettingsBuilder Remove(string actionName, string controllerName, RouteValueDictionary routeValues)
Name of the action.
controllerNamestringName of the controller.
routeValuesRouteValueDictionaryThe route values.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the action and controller for the remove operation
public UploadAsyncSettingsBuilder Remove(string actionName, string controllerName)
Name of the action.
controllerNamestringName of the controller.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the route name for the remove operation
public UploadAsyncSettingsBuilder Remove(string routeName)
Name of the route.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the action for the remove operation
public UploadAsyncSettingsBuilder Remove<TController>(Expression<Action<TController>> controllerAction) where TController : Controller
The action.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
The name of the form field that is submitted to removeUrl.
public UploadAsyncSettingsBuilder RemoveField(string value)
The value for RemoveField
Returns:Returns the current UploadAsyncSettingsBuilder instance.
The URL of the handler which is responsible for the removal of the uploaded files (if any). The handler must accept POST requests with one or more "fileNames" fields which specify the files that will be deleted.
public UploadAsyncSettingsBuilder RemoveUrl(string value)
The value for RemoveUrl
Returns:Returns the current UploadAsyncSettingsBuilder instance.
The HTTP verb that will be used by the remove action.
public UploadAsyncSettingsBuilder RemoveVerb(string value)
The value for RemoveVerb
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the route values for the save operation
public UploadAsyncSettingsBuilder Save(RouteValueDictionary routeValues)
The route values of the action method.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the route and values for the save operation
public UploadAsyncSettingsBuilder Save(string routeName, object routeValues)
Name of the route.
routeValuesobjectThe route values.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the route and values for the save operation
public UploadAsyncSettingsBuilder Save(string routeName, RouteValueDictionary routeValues)
Name of the route.
routeValuesRouteValueDictionaryThe route values.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the action, controller and route values for the save operation
public UploadAsyncSettingsBuilder Save(string actionName, string controllerName, object routeValues)
Name of the action.
controllerNamestringName of the controller.
routeValuesobjectThe route values.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the action, controller and route values for the save operation
public UploadAsyncSettingsBuilder Save(string actionName, string controllerName, RouteValueDictionary routeValues)
Name of the action.
controllerNamestringName of the controller.
routeValuesRouteValueDictionaryThe route values.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the action and controller for the save operation
public UploadAsyncSettingsBuilder Save(string actionName, string controllerName)
Name of the action.
controllerNamestringName of the controller.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the route name for the save operation
public UploadAsyncSettingsBuilder Save(string routeName)
Name of the route.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Sets the action for the save operation
public UploadAsyncSettingsBuilder Save<TController>(Expression<Action<TController>> controllerAction) where TController : Controller
The action.
Returns:Returns the current UploadAsyncSettingsBuilder instance.
The name of the form field which is submitted to saveUrl. The default value is the input name.
public UploadAsyncSettingsBuilder SaveField(string value)
The value for SaveField
Returns:Returns the current UploadAsyncSettingsBuilder instance.
The URL of the handler that will receive the submitted files. The handler must accept POST requests which contain one or more fields with the same name as the original input name.
public UploadAsyncSettingsBuilder SaveUrl(string value)
The value for SaveUrl
Returns:Returns the current UploadAsyncSettingsBuilder instance.
By default, the files are uploaded as file data. When set to true, the files are read as a file buffer by using FileReader. This buffer is sent in the request body.
public UploadAsyncSettingsBuilder UseArrayBuffer()
Returns the current UploadAsyncSettingsBuilder instance.
By default, the files are uploaded as file data. When set to true, the files are read as a file buffer by using FileReader. This buffer is sent in the request body.
public UploadAsyncSettingsBuilder UseArrayBuffer(bool value)
The value for UseArrayBuffer
Returns:Returns the current UploadAsyncSettingsBuilder instance.
Controls whether to send credentials (cookies, headers) for cross-site requests.
public UploadAsyncSettingsBuilder WithCredentials(bool value)
The value for WithCredentials
Returns:Returns the current UploadAsyncSettingsBuilder instance.