Download code in Handler

3 posts, 0 answers
  1. Vishal
    Vishal avatar
    5 posts
    Member since:
    Sep 2012

    Posted 20 Sep 2012 Link to this post

    Hi,

    How can I download the file from Database in FileExplorer when physcial file is not stored on client or the server but only stored in DB in binary format.


    Thanks

    Vishal.

  2. Vessy
    Admin
    Vessy avatar
    1388 posts

    Posted 24 Sep 2012 Link to this post

    Hi Vishal,

    I believe the following live demo will be of help in solving this case: FileExplorer / Filter files and download. It shows a possible way to handle the OnClientFileOpen() event in order to download the selected file.

    The full code of this example (including the code of Handler.ashx) is available in the folder, where RadControls are installed on your computer. In order to make a file directly downloadable, you will need to add an HTTP header of type "content-disposition" (see the Handler's WriteFile()).

    Please, refer to the following w3.org article for more information regarding HTTP header fields: Header Field Definitions.
     
    Additionally, you could take a look at the following code library and a live demo (if you haven't done it yet), which are representing the way to integrate RadFileExplorer with a database:

    Kind regards,
    Vesi
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vishal
    Vishal avatar
    5 posts
    Member since:
    Sep 2012

    Posted 24 Sep 2012 Link to this post

    Ok. Thanks.

    I will have a look

    Vishal.
Back to Top