Open tarkhil opened 1 year ago
Hey @tarkhil
comments
are not implemented and not on the short term roadmap of ownCloud Web. The owncloud-sdk
basically only implements what's needed in web. So there was never a need to implement it in the sdk.tags
, the ownCloud 10 tags are not implemented in ownCloud Web. ownCloud Infinite Scale (oCIS) has a different tags implementation, which is usable in ownCloud Web. But it is a different solution.TL;DR: sorry to say that both are not implemented and currently not planned... at least not by an ownCloud developer.
Okay; I'm going to implement all of this myself, but maybe you can help me with oc.davClient.
const dav = this.oc.files.davClient;
await dav.request( 'POST',
`/dav/comments/files/${d.fileid}`,
{},
{
actorType:"users",
verb:"comment",
message: this.newComment
},
{
withCredentials: true
}
);
for some reason does not supply credentials. Client has been initialized with URL/username/password and has just performed some requests. oc.helpers._authHeader exists. Adding `Authorization: oc.helpers._authHeader results in
cess to XMLHttpRequest at 'https://owncloud/remote.php/dav/dav/comments/files/49838' from origin 'http://client' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
The answer should be rather trivial, but I'm stuck.
Sorry, my dumb fault. /comments/files/${d.fileid} instead of /dav/comments/files/${d.fileid}
I still wonder why withCredentials: true does not work
Could not find them in SDK; are they not implemented (yet) or are they considered too trivial and to be implemented by user?