ASP.NET File Manager - Download Files (available now in v2011.1)

24 March 2011

Check out the new 'Download File' feature of our slick ASP.NET File Manager that's available now in DXperience v2011.1 release:

DevExpress ASP.NET File Manager's New Download File Feature in FireFox Browser

Download Selected File

With the next major release, your end-users will have the ability to download a selected file from the User Interface of the ASPxFileManager!

New Toolbar Button

A new toolbar item has been introduced: the Download button. It's hidden by default and to show it, just set:

SettingsToolbar.ShowDownloadButton = true

New Client-Side API

A new client-side method and event have been added to help you with the download file feature:

The new client-side method, ASPxClientFileManager.Download, helps you to invoke the selected file download. For example, you can call it from an external button like so:

ASPxClientFileManager.GetSelectedFile().Download();

There's also a new client-side event called FileDownloading which helps you to add things like a confirmation dialog:

FileDownloading="function(s, e) {
    e.cancel = !confirm('Are you sure you want to download ' + e.file.name + ' ?');
}"

New Server-Side Event

A new server-side event called FileDownloading has been added. The new event helps you work with the file stream. For example, you can use this server-side event to add a watermark to the downloaded image files:

// Arguments members:
// FileManagerFile File
// Stream InputStream - stream of file from file system
// Stream OutputStream - is null, but you can set new stream (replace original input stream) for downloading
// bool Cancel
           
// For example:

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

Part of v2011 vol 1

The new 'Download File' feature of our ASP.NET File Manager is available now with DXperience v2011 volume 1 release.

 

What do you think of the new download file feature?

Drop me a line below with your thoughts. Thanks.

 

DXperience? What's That?

DXperience is the .NET developer's secret weapon. Get full access to a complete suite of professional components that let you instantly drop in new features, designer styles and fast performance for your applications. Try a fully-functional version of DXperience for free now: http://www.devexpress.com/Downloads/NET/

Follow MehulHarry on Twitter

11 comment(s)
Paul J Cowan

Glad to see this finally available in this great control.

25 March, 2011
Ahmed Permassa

This looks great but there are some professional controls like [...] which allows you to view/manage the folders according to permissions.

3 August, 2011
Mehul Harry (DevExpress)
12 August, 2011
Giorgio Russo

Hello, How can I get Filename ID from a Link Custom Provider =

7 April, 2012
Mehul Harry (DevExpress)

Giorgio,

Please post your question here and our support team can help you:

www.devexpress.com/.../CreateIssue.aspx

Thanks.

9 April, 2012
Mario Malvido

Hi Mehul Harry

How can selected files and download all files selected?

Thanks in advance

14 August, 2012
Mehul Harry (DevExpress)

Yesenia,

It's not possible currently:

www.devexpress.com/.../Q384976

14 August, 2012
Mario Malvido

Thanks Mehul and link is private:

You can't view this question because it is marked as private

14 August, 2012
Mehul Harry (DevExpress)

Sorry Yesenia,

Essentially it says:

ASPxFileManager can operate only in the Single Selection mode. As a result, only one file can be downloaded at a time. I am afraid we do not have any components that allow downloading several files simultaneously.

14 August, 2012
James Nakisa

Am a new user with some controls with visual studio and just wondering how best an aspxfilemanager can be used to work properly without any databases.

16 December, 2015
Don Wibier (DevExpress)

James,

The standard behaviour of the ASPxFileManager is to manage files on the web-server's local file system. For this no database is required.

Because the architecture of the ASPxFileManager, it is also possible to use/build a different FileSystem provider class which could manage files from a database or the cloud e.g. DropBox, Azure Blob Storage or Amazon S3 Storage.

These features are standard available and you can read more about it at:

community.devexpress.com/.../cloudproviders-connecting-the-asp-net-file-manager-to-dropbox-now-available-in-v14-2.aspx

17 December, 2015

Please login or register to post comments.