Skip to main content
Tab

UploadedFile.FileContent Property

Gets a stream object that points to the uploaded file.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public Stream FileContent { get; }

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 FileContent property. To do this, you can utilize the using statement or Dispose method.

using (Stream stream = e.UploadedFile.FileContent) {
     // do something with stream
}
See Also