FileManagerFileUploadEventArgs.File Property
Gets a file, related to the event.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
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