New to Telerik UI for ASP.NET MVC? Download free 30-day trial

UploadAsyncSettingsBuilder

A builder class for IUploadAsyncSettings

Methods

AutoUpload(System.Boolean)

Sets a value indicating whether to start the upload immediately after selecting a file

Parameters

value - System.Boolean

true if the upload should start immediately after selecting a file, false otherwise; true by default

Batch(System.Boolean)

Sets a value indicating whether to upload selected files in one batch (request)

Parameters

value - System.Boolean

true if the files should be uploaded in a single request, false otherwise; false by default

ChunkSize(System.Double)

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.

Parameters

value - System.Double

The value for ChunkSize

Concurrent(System.Boolean)

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.)

Parameters

value - System.Boolean

The value for Concurrent

Concurrent()

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.)

MaxAutoRetries(System.Double)

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.

Parameters

value - System.Double

The value for MaxAutoRetries

AutoRetryAfter(System.Double)

If the property is set the failed upload request will be repeated after the declared amount of ticks.

Parameters

value - System.Double

The value for AutoRetryAfter

Save(System.String,System.String,System.Web.Routing.RouteValueDictionary)

Sets the action, controller and route values for the save operation

Parameters

actionName - System.String

Name of the action.

controllerName - System.String

Name of the controller.

routeValues - System.Web.Routing.RouteValueDictionary

The route values.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Save("Save", "Home", new RouteValueDictionary{ {"id", 1} });
                        )
            )

Save(System.String,System.String,System.Object)

Sets the action, controller and route values for the save operation

Parameters

actionName - System.String

Name of the action.

controllerName - System.String

Name of the controller.

routeValues - System.Object

The route values.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Save("Save", "Home", new { id = 1 });
                        )
            )

Save(System.String,System.String)

Sets the action and controller for the save operation

Parameters

actionName - System.String

Name of the action.

controllerName - System.String

Name of the controller.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Save("Save", "Home");
                        )
            )

Save(System.String)

Sets the route name for the save operation

Parameters

routeName - System.String

Name of the route.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Save("Default");
                        )
            )

Save(System.Web.Routing.RouteValueDictionary)

Sets the route values for the save operation

Parameters

routeValues - System.Web.Routing.RouteValueDictionary

The route values of the action method.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Save(MVC.Home.Save(1).GetRouteValueDictionary());
                        )
            )

Save(System.String,System.Web.Routing.RouteValueDictionary)

Sets the route and values for the save operation

Parameters

routeName - System.String

Name of the route.

routeValues - System.Web.Routing.RouteValueDictionary

The route values.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Save("Default", "Home", new RouteValueDictionary{ {"id", 1} });
                        )
            )

Save(System.String,System.Object)

Sets the route and values for the save operation

Parameters

routeName - System.String

Name of the route.

routeValues - System.Object

The route values.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Save("Default", new { id = 1 });
                        )
            )

Save(System.Linq.Expressions.Expression)

Sets the action for the save operation

Parameters

controllerAction - System.Linq.Expressions.Expression<Action>

The action.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Save<HomeController>(controller => controller.Save())
                        )
            )

SaveField(System.String)

Sets the field name for the save operation

Parameters

fieldName - System.String

The form field name to use for submiting the files. The Upload name is used if not set.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .SaveField("attachment");
                        )
            )

SaveUrl(System.String)

Sets an absolute or relative Save action URL. Note that the URL must be in the same domain for the upload to succeed.

Parameters

url - System.String

The Save action URL.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .SaveUrl("/save");
                        )
            )

Remove(System.String,System.String,System.Web.Routing.RouteValueDictionary)

Sets the action, controller and route values for the remove operation

Parameters

actionName - System.String

Name of the action.

controllerName - System.String

Name of the controller.

routeValues - System.Web.Routing.RouteValueDictionary

The route values.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Remove("Remove", "Home", new RouteValueDictionary{ {"id", 1} });
                        )
            )

Remove(System.String,System.String,System.Object)

Sets the action, controller and route values for the remove operation

Parameters

actionName - System.String

Name of the action.

controllerName - System.String

Name of the controller.

routeValues - System.Object

The route values.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Remove("Remove", "Home", new { id = 1 });
                        )
            )

Remove(System.String,System.String)

Sets the action and controller for the remove operation

Parameters

actionName - System.String

Name of the action.

controllerName - System.String

Name of the controller.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Remove("Remove", "Home");
                        )
            )

Remove(System.String)

Sets the route name for the remove operation

Parameters

routeName - System.String

Name of the route.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Remove("Default");
                        )
            )

Remove(System.Web.Routing.RouteValueDictionary)

Sets the route values for the remove operation

Parameters

routeValues - System.Web.Routing.RouteValueDictionary

The route values of the action method.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Remove(MVC.Home.Remove(1).GetRouteValueDictionary());
                        )
            )

Remove(System.String,System.Web.Routing.RouteValueDictionary)

Sets the route and values for the remove operation

Parameters

routeName - System.String

Name of the route.

routeValues - System.Web.Routing.RouteValueDictionary

The route values.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Remove("Default", "Home", new RouteValueDictionary{ {"id", 1} });
                        )
            )

Remove(System.String,System.Object)

Sets the route and values for the remove operation

Parameters

routeName - System.String

Name of the route.

routeValues - System.Object

The route values.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Remove("Default", new { id = 1 });
                        )
            )

Remove(System.Linq.Expressions.Expression)

Sets the action for the remove operation

Parameters

controllerAction - System.Linq.Expressions.Expression<Action>

The action.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .Remove<HomeController>(controller => controller.Remove())
                        )
            )

RemoveUrl(System.String)

Sets an absolute or relative Remove action URL. Note that the URL must be in the same domain for the operation to succeed.

Parameters

url - System.String

The Remove action URL.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .RemoveUrl("/remove");
                        )
            )

RemoveField(System.String)

Sets the field name for the remove operation

Parameters

fieldName - System.String

The form field name to use for submiting the files. "fileNames" is used if not set.

Example


             @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Async(async => async
                            .RemoveField("attachments");
                        )
            )

UseArrayBuffer(System.Boolean)

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.

Parameters

useArrayBuffer - System.Boolean

true if arrayBuffer should be send; false by default

WithCredentials(System.Boolean)

Sets a value indicating whether to send credentials (cookies, headers) for cross-site requests.

Parameters

withCredentials - System.Boolean

true if credentials should be sent, false otherwise; true by default

In this article
Not finding the help you need?