Page 1 of 1

Retrieving DocumentName from OpenKM

PostPosted:Wed Aug 16, 2017 7:13 am
by PSHREYASHOLLA
Hi,

We are using SDK 1.1,
Code: Select all
OKMWebservices ws= OKMWebservicesFactory.newInstance(host, user, password);
ws.createDocumentSimple(docPath, stream);
to upload the document to OpenKM.

Now using document UUID , which API can we call to get the uploaded DocumentName.

Thanks And Regards,
Shreyas Holla P.

Re: Retrieving DocumentName from OpenKM

PostPosted:Thu Aug 17, 2017 8:08 pm
by jllort
Might be you are looking for it :
https://docs.openkm.com/kcenter/view/ok ... getContent

Also from here you have all API documentation:
https://docs.openkm.com/apidoc/

Re: Retrieving DocumentName from OpenKM

PostPosted:Mon Aug 21, 2017 8:20 am
by PSHREYASHOLLA
As you mentioned https://docs.openkm.com/kcenter/view/ok ... getContent , this will give the file contents in InputStream, but how can I get the fileName?.

Re: Retrieving DocumentName from OpenKM

PostPosted:Wed Aug 23, 2017 10:54 am
by jllort
For all the document attibutes must use getProperties method ( https://docs.openkm.com/kcenter/view/ok ... Properties ) it will be returned a Document object. With document object to can get name with path with something like:
Code: Select all
String name = PathUtils.getName(doc.getPath);

Re: Retrieving DocumentName from OpenKM

PostPosted:Tue Sep 12, 2017 4:36 am
by PSHREYASHOLLA
Hi Jllort, Thanks for the update, this solves my problem :)