Skip to main content

File Download

You can provide your end-users with an ability to download files selected within FileManager.

Note

To enable the file downloading functionality within your FileManager, the Partial View with FileManager must be wrapped with the HTML form.

Download Initiation

File download can be initiated in the following manner.

Via a user interface.

To display the download button within a toolbar, add an object of the FileManagerToolbarDownloadButton type to the SettingsToolbar.Items collection. If the collection is empty, the download button is displayed provided that the AllowDownload property is set to true. A click on this button initiates a download of the selected files.

FileManager-FileDownload.png

Programmatically.

Call the client-side ASPxClientFileManagerFile.Download method of an object that represents the file to download it.

fileManager1.GetSelectedFile().Download();

File Processing

FileManager allows you to process the downloaded file and to cancel the file download if required. You can respond to the initiated file download operation in the following manner.

For instance, you can use a server-side event to add a watermark to downloaded image files.