This is a migrated thread and some comments may be shown as answers.

Pls. confirm my File Download Scenario

1 Answer 72 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Midav Obuarez
Top achievements
Rank 1
Midav Obuarez asked on 03 Jul 2011, 12:24 AM
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

1 Answer, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 06 Jul 2011, 02:45 PM
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!

Tags
Upload
Asked by
Midav Obuarez
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Share this question
or