FileManagerFileUploadEventArgs.File Property
In This Article
Gets a file, related to the event.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public FileManagerFile File { get; }
#Property Value
Type | Description |
---|---|
File |
A File |
#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