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

UploadFileBuilder

A builder class for UploadFile

Methods

Name(System.String)

Specifies the name of the file

Parameters

name - System.String

The file name

Example


            @( Html.Kendo().Upload()
                .Name("files")
                .Files(files => files.Add().Name("file.txt").Size(500).Extension(".txt"))
                .Async(a => a
                    .Save("Save", "Compose")
                    .Remove("Remove", "Compose")
                    .AutoUpload(true)
                )
            )

Size(System.Int64)

Specifies the size of the file in bytes

Parameters

size - System.Int64

The file size

Example


            @( Html.Kendo().Upload()
                .Name("files")
                .Files(files => files.Add().Name("file.txt").Size(500).Extension(".txt"))
                .Async(a => a
                    .Save("Save", "Compose")
                    .Remove("Remove", "Compose")
                    .AutoUpload(true)
                )
            )

Extension(System.String)

Specifies the extension of the file

Parameters

extension - System.String

The file extension

Example


            @( Html.Kendo().Upload()
                .Name("files")
                .Files(files => files.Add().Name("file.txt").Size(500).Extension(".txt"))
                .Async(a => a
                    .Save("Save", "Compose")
                    .Remove("Remove", "Compose")
                    .AutoUpload(true)
                )
            )

In this article
Not finding the help you need?