Hi all,
I'm able to create a document but not able to set the edoc parameters and content. My contentStream is a base64 encoded PDF.
Any assistance would be appreciated.
-Ben
Hi all,
I'm able to create a document but not able to set the edoc parameters and content. My contentStream is a base64 encoded PDF.
Any assistance would be appreciated.
-Ben
Hey Ben,
I've done a little bit of work with CMIS, unfortunately it's mostly been either via the PortCMIS dll or direct web calls, while it looks like you're running your queries through Postman, so I'm not sure if my experience will directly relate.
It sounds like your process is resulting in an empty Laserfiche document with no PDF content? Are you getting any errors back from the request? Also, what URL are you using for the request?
There seem to be a couple differences between what you're trying to do and the upload process I've used for PDFs via http requests.
First, I didn't use base64 encoding for the content stream. I just wrote the FileStream directly to the RequestStream with a text/UTF-8 header. Viewing the request in Fiddler it appeared as follows:
-----------
Content-Type: text/plain; charset=utf-8
Content-Disposition: form-data; name="content"; filename="C:\Temp\PdfPages.pdf"
Test Text
1000
%PDF-1.6
%
1 0 obj
<</Type/XObject/BitsPerComponent 8/Subtype/Image/Width 40/ColorSpace/DeviceRGB/Filter/DCTDecode/Length 1172/Height 40>>stream
_JFIF___``C_____________________
(etc)
-----------
Second, we seem to have some differences in the included keys.
I did not include the last 3 PropertyId/Value pairs (lf:extension, cmis:contentStreamMimeType, and cmis:contentStreamLength.) CMIS/Laserfiche seemed able to determine those values based on the content stream itself. I also did not include the "folderId" or "Id" keys. I'm guessing that "Id" in this case is the CMIS repository name. With the method I used those values were specified in the URL:
http://[MyServer]/lfcmis/browser/[RepostioryId]/root?objectId=[FolderId]
I also had two key/value pairs which don't seem to be in your list:
"versioningState", "none"
"succinct", "true"
However I'm not sure if those are significant or not.
Hopefully looking at some of those differences will point you in the right direction!