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

[Solved] Feature request: savedialog / download file

2 Answers 89 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andreas
Top achievements
Rank 1
Andreas asked on 10 Dec 2008, 03:44 PM
Hello Telerik team,

I just came along a problem, which I didn't thought it would get that big.
I have written a web service to up/download files, because they are dynamically retrieved from a database/object-based system of ours. The files can be retrieved junkwise (a transaction-based web service method) or as byte[] in one piece.

Usually I invoke the web service method to get the byte[] and then I have the byte[]/stream on the client, but no possibility to say: "Take the stream to the user, which may save it in his file system with a save dialog". I always have to define an url/uri which points to the file. No byte[] or streams are allowed.

Now my feature request:
I don't see the point in storing the file on some public place (for the sake of security ) and then setting a link to the file which is then downloaded (linked button or something like that). After the download is finished this temporary file also has to be deleted (another user may download it because it is in a place where all silverlight clients may have access).

What about a "save dialog" control (like the upload control you already have in the silverlight controls) which let you choose the place to save the file? The source of the save dialog could be an url-based file, a stream or a web service which delivers a byte[].

Greetings,
Stefan



2 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 10 Dec 2008, 04:49 PM
Hello Stefan,

Siverlight has very tight security restrictions and it is not possible to interact with outside the browser. Therefore to add the "save file" functionality, the framework needs to enable us to do so.

We will add this functionality when we can, but currently this is not possible.

To address your specific issue - yes, recreating the file and downloading it from a server is an overkill but this is the only way I can think of.

If you are using authentication, you could check whether the users are logged in before serving the files.

Regards,
Miroslav
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Andreas
Top achievements
Rank 1
answered on 11 Dec 2008, 07:19 AM
Hello Miroslav,

Thanks for the quick response and your clearing words - at least I can stop searching for such a solution - the silverlight.net forum is full of such requests.

Overkill is just an understatement IMHO - hopefully MS extends Silverlight 2 with such a basic fuctionality soon.

Greetings,
Stefan

Tags
General Discussions
Asked by
Andreas
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Andreas
Top achievements
Rank 1
Share this question
or