You are viewing limited content. For full access, please sign in.

Question

Question

Document Creation and WebAccess URL Retrieval through CMIS

asked on July 13, 2017

We have a client whom we are trying to convert over to Laserfiche. There is one task they would like to perform as a demonstration that I think would be made simple through CMIS. That is:

 

-Import a document to Laserfiche

-Return the web URL to the document in XML

 

Is there a way to have the URL returned from a document in the repository? If not, constructing it ourselves wouldn't be hard. Can it be returned as XML or do we have to build it in XML ourselves?

 

Additionally, I tried creating a folder and a document through CMIS, and each time I get an UnsupportedMediaType exception. Here is a code example for creating a folder. When I run this I get the exception. I can retrieve information from a document in the repository such as name and ID, so I'm properly authenticated.

 

IFolder rootFolder = session.GetRootFolder();

IDictionary<string, object> properties = new Dictionary<string, object>();
properties[PropertyIds.ObjectTypeId] = "cmis:folder";
properties[PropertyIds.Name] = "a new folder";

IFolder newFolder = rootFolder.CreateFolder(properties);

 

1 0

Answer

SELECTED ANSWER
replied on July 16, 2017 Show version history

Hi Brian,

Yeah, we should document it somewhere in the help. But we have changed the CMIS implementation, so that if "cmis:folder" is specified, CMIS will automatically convert it to "lf:folder". But the change is not in the current released version.

When creating a document, there is an optional argument "contentStream" which can be set for the document content. Besides, there is a service setContentStream which can be used to existing document content. There should be a method in the CMIS client library to do that. You need to convert the PDF from a local path to contentStream in your library.

2 0

Replies

replied on July 13, 2017

Hi Brian,

CMIS doesn't return the Web Access URL, you have to construct it yourself. As you said, it is not hard. You can reference https://www.laserfiche.com/support/webhelp/Laserfiche/10/en-us/administration/Default.htm#../Subsystems/Integrations/Content/custom-URLs.htm.

 

For the create folder issue, the value for property objectTypeId should "lf:folder". 

2 0
replied on July 14, 2017 Show version history

I couldn't find anything mentioning lf:folder or lf:document in the documentation for the CMIS Gateway. Nonetheless, I was able to create the folder and document. Thank you. 

 

I was able to create a document from scratch. How can I import a PDF from a local path to LF through CMIS?

1 0
SELECTED ANSWER
replied on July 16, 2017 Show version history

Hi Brian,

Yeah, we should document it somewhere in the help. But we have changed the CMIS implementation, so that if "cmis:folder" is specified, CMIS will automatically convert it to "lf:folder". But the change is not in the current released version.

When creating a document, there is an optional argument "contentStream" which can be set for the document content. Besides, there is a service setContentStream which can be used to existing document content. There should be a method in the CMIS client library to do that. You need to convert the PDF from a local path to contentStream in your library.

2 0
You are not allowed to follow up in this post.

Sign in to reply to this post.