Skip to main content
A newer version of this page is available. .
Tab

FileManagerFileDownloadingEventArgs.InputStream Property

Gets a stream object that points to the downloaded file.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

public Stream InputStream { get; }

Property Value

Type Description
Stream

A Stream object that points to the downloaded file.

Remarks

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 InputStream property, perform actions on the stream, and send it to the client by setting the FileManagerFileDownloadingEventArgs.OutputStream property.

Important

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

Example

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