on 07-27-2009 11:36 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.