Repository navigation
Sharing folder fails with shareType must be an integer error response #15839
Copy link
Copy link
Closed
Labels
owncloudownCloud ServerownCloud Server
Description
Activity
Can you post the request also?
@micbar Please find below a full request/response log
POST /ocs/v1.php/apps/files_sharing/api/v1/shares HTTP/1.1 OCS-APIRequest: true Accept: application/xml Content-Length: 42 Content-Type: application/json; charset=UTF-8 Host: ocis.ocis-keycloak.latest.owncloud.works Connection: Keep-Alive User-Agent: Cyberduck/8.8.3.41368 (Mac OS X/14.4.1) (aarch64) Accept-Encoding: gzip,deflate Authorization: Bearer *** {"path":"d","shareType":3,"permissions":4} HTTP/1.1 200 OK Content-Length: 160 Content-Type: text/xml; charset=utf-8 Date: Fri, 19 Apr 2024 11:12:50 GMT Ocs-Api-Version: 1 Vary: Origin X-Request-Id: 3c9a7676557b/HgcReilixE-000556 <?xml version="1.0" encoding="UTF-8"?> <ocs><meta><status>error</status><statuscode>400</statuscode><message>shareType must be an integer</message></meta></ocs>You are sending a json body. That is not working on ocs. With our new libregraph sharing api, everything will be better 😄
Valid OCS Request
curl 'https://ocis.ocis-wopi.released.owncloud.works/ocs/v1.php/apps/files_sharing/api/v1/shares' \ -H 'accept: */*' \ -H 'accept-language: en' \ -H 'authorization: Bearer <access-token>' \ -H 'cache-control: no-cache' \ -H 'content-type: application/x-www-form-urlencoded' \ -H 'ocs-apirequest: true' \ --data-raw $'shareType=0&shareWith=moss&path=%2FNew+folder&permissions=17&role=viewer'
- added a commit that references this issue
on Apr 19, 2024 With our new libregraph sharing api, everything will be better 😄
Hopefully rather sooner than later as part of #14166.
Will have to make sure there is no regression for #13478.
- added 2 commits that reference this issue
on Apr 19, 2024 In 39a2172.
Metadata
Metadata
Assignees
Labels
owncloudownCloud ServerownCloud Server
Relates to #15838. When connected to oCIS, sharing a folder with the request
{"path":"/remote.php/webdav/d","shareType":3,"permissions":4}fails with response