Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createItem signature and submitted form data #73

Open
wiser opened this issue Sep 26, 2020 · 4 comments
Open

createItem signature and submitted form data #73

wiser opened this issue Sep 26, 2020 · 4 comments

Comments

@wiser
Copy link
Contributor

wiser commented Sep 26, 2020

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

@agea
Copy link
Owner

agea commented Sep 28, 2020

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

@wiser
Copy link
Contributor Author

wiser commented Sep 30, 2020

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.

@wiser
Copy link
Contributor Author

wiser commented Oct 6, 2020

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

@agea
Copy link
Owner

agea commented Oct 6, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants