Skip to main content

FileManagerFileDownloadingEventArgs.OutputStream Property

Set this property to change the original file content.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web


public Stream OutputStream { get; set; }

Property Value

Type Description

A Stream object to which the modified file stream is sent.


ASPxFileManager allows you to edit (modify, check etc.) a file before sending it to the client side. You can obtain a downloaded file via the FileManagerFileDownloadingEventArgs.InputStream property, perform actions on the stream, and send it to the client by setting the OutputStream property.


The FileManagerFileDownloadingEventArgs.InputStream and OutputStream properties are not in effect for cloud providers and are set to null.


The example below demonstrates how you can use the FileDownloading server-side event to add a watermark to the downloaded image files.

protected void ASPxFileManager1_FileDownloading(object source, DevExpress.Web.FileManagerFileDownloadingEventArgs e) {
    if (IsImageExtension(e.File.Extension))
        e.OutputStream = AddWatermarkToImage(e.InputStream);
See Also