Back to Devexpress

FileSystemConfiguration.AllowedFileExtensions Property

aspnetcore-devextreme-dot-aspnet-dot-mvc-dot-filemanagement-dot-filesystemconfiguration-0f2ae55e.md

latest1.4 KB
Original Source

FileSystemConfiguration.AllowedFileExtensions Property

Specifies the allowed file extensions.

Namespace : DevExtreme.AspNet.Mvc.FileManagement

Assembly : DevExtreme.AspNet.Core.dll

Declaration

csharp
public string[] AllowedFileExtensions { get; set; }

Property Value

TypeDescription
String[]

An array of allowed file extensions.

|

Remarks

The FileManager widget does not display a file if the file’s extension is not allowed. If a user tries to upload this file, the component displays an error message.

cshtml
@(Html.DevExtreme().FileManager()
    //...
    .AllowedFileExtensions(new[] { ".js", ".json", ".css" })
)

Concepts

Online Demo

See Also

FileSystemConfiguration Class

FileSystemConfiguration Members

DevExtreme.AspNet.Mvc.FileManagement Namespace