New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI async TagHelper UploadAsyncSettingsTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("async", ParentTag = "kendo-upload", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("async", ParentTag = "upload-editor", TagStructure = TagStructure.WithoutEndTag)]
[SuppressTagRendering]
public class UploadAsyncSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent

Inheritance: objectTagHelperTagHelperChildBaseUploadAsyncSettingsTagHelper

Implements: ITagHelperITagHelperComponent

Inherited Members TagHelperChildBase.Init(TagHelperContext)TagHelperChildBase.AddSelfToContext(TagHelperContext)TagHelperChildBase.CreateHandler(string)TagHelperChildBase.IdPrefixTagHelper.Process(TagHelperContext, TagHelperOutput)TagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-upload name="upload">
    <async auto-retry-after="2000" />
</kendo-upload>

Constructors

Initializes a new instance of the UploadAsyncSettingsTagHelper class.

C#
public UploadAsyncSettingsTagHelper()

Properties

If async.autoRetryAfter is set, the failed upload request is repeated after the declared amount of time in miliseconds.

C#
public double? AutoRetryAfter { get; set; }

By default, the selected files are uploaded immediately. To change this behavior, set autoUpload to false.

C#
public bool? AutoUpload { get; set; }

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.

C#
public bool? Batch { get; set; }

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.

C#
public double? ChunkSize { get; set; }

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.

C#
public bool? Concurrent { get; set; }

Sets the maximum number of attempts that are performed if an upload fails.

C#
public double? MaxAutoRetries { get; set; }

The name of the form field that is submitted to removeUrl.

C#
public string RemoveField { get; set; }

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.

C#
public string RemoveUrl { get; set; }

The HTTP verb that will be used by the remove action.

C#
public string RemoveVerb { get; set; }

The name of the form field which is submitted to saveUrl. The default value is the input name.

C#
public string SaveField { get; set; }

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.

C#
public string SaveUrl { get; set; }

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.

C#
public bool? UseArrayBuffer { get; set; }

Controls whether to send credentials (cookies, headers) for cross-site requests.

C#
public bool? WithCredentials { get; set; }

Methods

Adds the current TagHelper instance to its parent TagHelper.

C#
protected override void AddSelfToParent(TagHelperContext context)
Parameters:contextTagHelperContext

The TagHelper context.

Overrides: TagHelperChildBase.AddSelfToParent(TagHelperContext)

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelperChildBase.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public Dictionary<string, object> Serialize()
Returns:

Dictionary<string, object>