Tab

FileManagerFileUploadEventArgs.File Property

Gets a file, related to the event.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

public FileManagerFile File { get; }
Public ReadOnly Property File As FileManagerFile

Property Value

Type Description
FileManagerFile

A FileManagerFile object that represents a file currently being uploaded.

Available values:

Show 12 items
Name Description
Permissions

Provides a set of permissions for the File Manager's file.

Extension

Gets the string that specifies the extension of the file.

Folder

Gets the parent folder to which the current file belongs.

Equals(FileManagerFile)

Compares this FileManagerFile instance with the specified object.

FileManagerFile(FileSystemProviderBase, FileManagerFolder, String, String, FileManagerFileProperties)

Initializes a new instance of the FileManagerFile class with the specified settings when the specified file system provider is used.

FileManagerFile(FileSystemProviderBase, FileManagerFolder, String, String)

Initializes a new instance of the FileManagerFile class with the specified settings.

FileManagerFile(FileSystemProviderBase, FileManagerFolder, String, FileManagerFileProperties)

Initializes a new instance of the FileManagerFile class with the specified settings when the specified file system provider is used.

FileManagerFile(FileSystemProviderBase, FileManagerFolder, String)

Initializes a new instance of the FileManagerFile class with the specified settings when the specified file system provider is used.

FileManagerFile(FileSystemProviderBase, String, String[], FileManagerFileProperties)

Initializes a new instance of the FileManagerFile class with specified settings.

FileManagerFile(FileSystemProviderBase, String, String[])

Initializes a new instance of the FileManagerFile class with the specified settings.

FileManagerFile(FileSystemProviderBase, String, String)

Initializes a new instance of the FileManagerFile class with the specified settings.

FileManagerFile(FileSystemProviderBase, String)

Initializes a new instance of the FileManagerFile class with the specified relative name when the specified file system provider is used.

Remarks

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

Examples

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