Skip to main content

UploadedFile.FileContent Property

Gets a stream object that points to the uploaded file.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web


public Stream FileContent { get; }

Property Value

Type Description

A Stream object that points to the uploaded file.


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.


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