Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Comments and tag APIs #1215

Open
tarkhil opened this issue Feb 21, 2023 · 3 comments
Open

Comments and tag APIs #1215

tarkhil opened this issue Feb 21, 2023 · 3 comments

Comments

@tarkhil
Copy link

tarkhil commented Feb 21, 2023

Could not find them in SDK; are they not implemented (yet) or are they considered too trivial and to be implemented by user?

@kulmann
Copy link
Member

kulmann commented Feb 27, 2023

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.
  • similar for 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.

@tarkhil
Copy link
Author

tarkhil commented Apr 29, 2023

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.

@tarkhil
Copy link
Author

tarkhil commented Apr 29, 2023

Sorry, my dumb fault. /comments/files/${d.fileid} instead of /dav/comments/files/${d.fileid}

I still wonder why withCredentials: true does not work

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

No branches or pull requests

2 participants