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

Set/Unset arbitrary metadata not implemented #43

Open
glpatcern opened this issue Aug 31, 2023 · 2 comments
Open

Set/Unset arbitrary metadata not implemented #43

glpatcern opened this issue Aug 31, 2023 · 2 comments
Assignees
Milestone

Comments

@glpatcern
Copy link
Member

The functions in https://github.com/mahdibaghbani//nc-sciencemesh/blob/owncloud/lib/Controller/RevaController.php#L984-L1015 return 503, but they are needed for uploads to work as the remote client attempts to set a metadata attr (and fails).

@glpatcern
Copy link
Member Author

For now this can be mitigated by responding STATUS_OK and the uploads work.

@glpatcern
Copy link
Member Author

To implement this, the following calls are useful (replace myattribute and myvalue accordingly):

1 - setting an xattr:

curl -X PROPPATCH -u user:pwd -H "Content-Type: application/xml" -d '<?xml version="1.0" encoding="utf-8"?><d:propertyupdate xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"><d:set><d:prop><s:myattribute>myvalue</s:myattribute></d:prop></d:set></d:propertyupdate>' https://owncloud-server/remote.php/dav/files/user/path/to/file

Response example:

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/remote.php/dav/files/einstein/welcome.txt</d:href><d:propstat><d:prop><s:myattribute/></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>

2 - retrieving an xattr:

curl -X PROPFIND -u user:pwd -H "Content-Type: application/xml" -d '<?xml version="1.0" encoding="utf-8"?><d:propfind xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"><d:prop><s:myattribute/></d:prop></d:propfind>'  https://owncloud-server/remote.php/dav/files/user/path/to/file

Response example:

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/remote.php/dav/files/einstein/welcome.txt</d:href><d:propstat><d:prop><s:myattribute>myvalue</s:myattribute></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>

@glpatcern glpatcern modified the milestones: Release 0.6, Release 1.0 Feb 27, 2024
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