Pls. confirm my File Download Scenario

2 posts, 0 answers
  1. Midav Obuarez
    Midav Obuarez avatar
    13 posts
    Member since:
    Jan 2010

    Posted 02 Jul 2011 Link to this post

    Hi,

    I am going to try to implement RadUpload control to upload end user's files to Sql Server DB, saving each file in a varbinary(max) field.

    What will be the best approach to download the file previously saved at the server in sql server db?
    Can I just use a WCF method to read the data from sql server db and return it to the client as an array of bytes?
    Do I also have to break the downloaded data into chinks, like the RadUpload Control does while uploading files.

    Is it essential to also use ashx handler file while downloading file, or can I use wcf? RADUpload control uses ashx.

    In ASP.Net I used to use Response object, and browser would automatically open save as window to save binary data as a file. How can I save binary data as a file in silverlight?

    Thank you,

    Midav
  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 06 Jul 2011 Link to this post

    Hello Midav Obuarez,

    The RadUpload control is only capable of uploading files from the Silverlight client application to the server. If you want to be able to return the data back to the cilent, you would have to use a different data channel - for example WCF service. I am not sure you will be able to reuse the RadUploadHandler to implement donwload.

    Data chunking depends on the size of the data that you are going to transfer. If you expect large data, then it is definitely better to use chunks and transfer the data a chunk at a time.

    Kind regards,
    Alex Fidanov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. DevCraft banner
Back to Top