Example using file download

Jun 7, 2013 at 8:11 PM
Hello,

Does anyone have any examples in code using the HSS Interlink to download a file? There is an example on the homepage but it is just a function and doesnt provide any documention.

Thanks for your time!
Coordinator
Jun 8, 2013 at 10:50 AM
The latest version 3.x is has completely separated the upload and download "clients" from the UI. We recommend you use the latest source code.

In the latest version you can just create a new DownloadClient instance, and call DownloadAsync. The DownloadCompleted event will contain the resulting file contents. Or you can call one of the overloads and provide an existing stream that will receive the downloaded file.
Jun 14, 2013 at 4:51 PM
Thanks for the reply hyspdrt,

Unfortunately I cannot use silverlight 5 and I am stuck using an older version of interlink. Is there an example of downloading and running a file with Interlink and silverlight 4?
Coordinator
Jun 14, 2013 at 9:42 PM
using the Static Method

string fileName = "serverSideFileName";
DownloadFileDialog.DownloadFile(saveFileDialog.SafeFileName, saveFileDialog.OpenFile(), fileName);

or

string[] fileNames = new string[] { "serverSideFileName1", "serverSideFileName2" }; // The files to download from the server
DownloadFileDialog.DownloadFiles(saveFileDialog.SafeFileName, saveFileDialog.OpenFile(), fileNames);