cancel
Showing results for 
Search instead for 
Did you mean: 

Reg FileUpload and FileDownload UI elements

Former Member
0 Kudos

Hi All,

I wanted to understand

a. Where does the file gets stored on the server using the UI element FileUpload

b. If I have to download the file from a given path on the server, how to achieve it using FileDownload UI element.

Regards

Nikhil

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member192434
Active Contributor
0 Kudos

Hi

The file get store onto server current context Resource, when you upload the documents

whenever you download the doc from server.....you required to access the Resource location of serve. by useing following code.

use linktoAction and put this code under the action.

IWDResource res = WDResourceFactory.createResource(

new FileInputStream(FilePath"
"
wdContext.currentContextElement().getDirectory()

+wdContext.currentContextElement().getFileName()), wdContext.currentContextElement().getFileName(),

WDWebResourceType.DOC, true);

wdComponentAPI.getMessageManager().reportSuccess("=="+FilePath);

IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(

res.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal()),

res.getResourceName());

window.show();

} catch (FileNotFoundException e) {

// ..

}

Thanks

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.