Skip to main content
Tab

FileManagerFileUploadEventArgs.File Property

Gets a file, related to the event.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.1.dll

Declaration

public FileManagerFile File { get; }

Property Value

Type Description
FileManagerFile

A FileManagerFile object that represents a file currently being uploaded.

Remarks

Within the ASPxFileManager.FileUploading event’s handler, the currently processed file can be accessed by using the File property.

Example

The code below allows end-users to upload only mp3 files to the “Music mp3” folder.

protected void ASPxFileManager1_FileUploading(object source, DevExpress.Web.FileManagerFileUploadEventArgs e) {
      if (e.File.Folder.FullName == "Files\\Music mp3")
            if (e.File.Extension != ".mp3") {
                e.Cancel = true;
                e.ErrorText = "You can only upload mp3 files to this folder";
            }
}
See Also