on 11-03-2011 12:43 PM
Hi,
Is it possible to execute a FileDownload programmatically?
When a user clicks on the link, the FileDowload is executed (works fine). But is it possible, for example, perform a FileDowload form a button?
Thanks,
Ricard.
Hi,
It certainly can be done, but you have to take care yourself of the mime type, file extension, etc.
First you create a WDWebResourceType based on these properties, then generate an URL to the resulting resource by constructing a WDDeployableObjectPart and retrieving the URL of the resulting IWDResource, and then create a non modal external window using this url
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ricard,
If the file you want to download is available in you context then you can write the following code to download it on your button
wdContext.current<node>Element().get<Attribute>().download();
Regards
Piyas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.