UploadedFile.FileContent Property
Gets a stream object that points to the uploaded file.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
#Property Value
Type | Description |
---|---|
Stream | A Stream object that points to the uploaded file. |
#Remarks
Uploading the file specified within the ASPxUploadControl can be initiated either by a call to the client ASPxClientUploadControl.Upload method, or automatically on the next round trip to the server (for instance, on a button click or page refresh). On the server side, while saving the uploaded file, the FileContent property can be used to access the file’s contents.
Important
To prevent the site performance degradation, it is required to release unmanaged resources after using the File
using (Stream stream = e.UploadedFile.FileContent) {
// do something with stream
}