createItem signature and submitted form data
Opened this issue · 4 comments
Hello,
to start, let me thank you for still maintaining your library, we use it time to time it’s a very convenient.
We have tried to use the "createItem" method and we observe a shift between what we expected and what we get.
In your documentation, we have to provide a folderId
. The cmis specification says it’s optionnal, so we try to put null
value and it works. Ok, that’s fine.
But when we provide a real value (the root folder id of our repository) the request send an objectId
data instead of a folderId
.
There is what we receive in our server :
cmisaction = > "createItem",
objectId => 2,
propertyId => [...],
propertyValue => [...],
succinct => true
Our server doesn’t understand the submitted objectId
parameter.
According to you, is there a mistake in the cmis library or do we have to consider the objectId is the folderId in the server side ?
Thanks for your help.
Wiser
I think it's a bug, probably the line
https://github.com/agea/CmisJS/blob/master/src/cmis.ts#L1342
it's wrong, you may create a pull request with the correction, and if possible even a test (the tests were run against alfresco mainly, i don't know what is your backend)
Thank you
Ok, I will do a pull request with a test.
Our backend is homemade and we use your lib to validate our new devs.
We also use your lib to administer our servers.
Hello @agea
I have take a look on the lib tests and there is a lot of HTTP 403 Forbidden
errors from the Alfresco server.
So I can add another assertion for the createItem
method but I am pretty sure with this server will reject it as it does with the others.
By the way, there is many other warnings, do you also have all these "UnhandledPromiseRejectionWarning" when you run tests ?
Thanks
hello, it's possibile that the test server specified in the tests (https://cmis.alfresco.com/cmisbrowser) is no longer available to everyone.. if you have an internal alfresco available you can change the url to your server via an environment variable, otherwise just add your test, and i will check before merging the pull request