on 02-25-2009 10:31 AM
Hi All,
I am trying to download file from KM. I tried following code but it is not taking path into FileInputStream.
String resourcePath = "http://abc.xyz.com:50000/irj/go/km/docs/documents/risha/ XYZ 20409.doc";
IWDResource resource;
String name = "XYZ 20409.doc";
String path = resourcePath;
InputStream stream;
try {
stream = new FileInputStream(path);
resource = WDResourceFactory.createResource( stream, name, WDWebResourceType.DOC, true);
stream.close();
wdComponentAPI.getWindowManager() .createNonModalExternalWindow( resource.getUrl( 0), name).show();
//store resource object in context attribute 'FileResource'
wdContext.currentCtx_va_FileDataElement().setCtx_va_FileResource(resource);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Please helpme out.
Thanks
Risha
Hi,
Create a linkto url ui element and provide the url, with out any code you will be able to download.
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ayyapparaj ,
My exact requirement is to download the file from KM and get the file name from that URL. and send it to RFC.
I am getting URL from KM like
http://abc.xyz.com:50000/irj/go/km/docs/documents/app/proposal%20-%20abpb%20arrb%20020409.doc
From this URL ,I need only filename.How to replace special characters like %20 for space......etc..
But User will give the file name in different characters and formats.
Is there any other way to get the file name?
Please helpme out.
Thanks
Risha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.