Closed jesmrec closed 1 year ago
some remarks: clients should be sending a space
property together with a path
relative to the space. This was introduced with https://github.com/cs3org/reva/pull/2913
We decided to deprecate the parameter "space_ref". We decided to use "space" parameter instead. The difference is that "space" must not contain a "path". The "path" parameter can be used in combination with "space" to create a relative path request
for the space id we accept
// The accepted formats are:
// <providerid>$<spaceid>!<nodeid> -> <providerid>$<spaceid>, <nodeid>
// <providerid>$<spaceid> -> <providerid>$<spaceid>, <spaceid>
// <spaceid> -> <spaceid>, <spaceid>
Now for the path in the response we see that when listing public links the path does contain the parent folders ... we need to check why the create response does not contain them.
@butonic Currently, the iOS client uses the File ID as space_ref
. Can it also just pass that to space
- or should it pass only the space id?
If it should pass only the space id, that will be a challenge because #5355 is still unsolved. And, by extension, without a deterministic way to determine the space id of a shared item, providing the correct, relative path will be a challenge as well.
@felix-schwarz See the examples above. you can provide anything from a complete resourceID to a single spaceID.
@butonic I tried sending in the param space
the space ID where the file is located (the one that comes in the id
property for a space in the /me/drives
endpoint), which has format ...$...
, and I receive a 404 from the server. The response is:
{
"ocs": {
"meta": {
"status": "failure",
"statuscode": 404,
"message": "Wrong path, file/folder doesn't exist"
}
}
}
And the curl command to reproduce it is:
curl -k -u user1:xxx -H 'User-Agent:Mozilla/5.0 (Android) ownCloud-android/3.0-beta.2' -H 'Content-Type:application/x-www-form-urlencoded' -X POST 'https://xxx.xxx.xxx.xxx:9200/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json' --data-binary 'path=/A/land2.jpg&shareType=3&permissions=1&name=link1&space=52c34980-e15f-49bf-a47f-c151c7d6ec9a$d45835cb-8606-4075-9488-076d315119f5' | json_pp
Tested on ocis.owncloud.works
any ETA for this fix?
Since getting the path is an expensive operation and might leak data I only added it for the POST
public link case. Let me know if other endpoints are also affected.
fix is here https://github.com/cs3org/reva/pull/4004 needs a reva bump after merge
Describe the bug
Creation of a public link: the
POST
request does not return the path to the item.Steps to reproduce
Steps to reproduce the behavior:
/A/land2.jpg
. Followingcurl
request will help:Expected behavior
path
field in POST response containing the path to the item:"path":"/A/land2.jpg",
Actual behavior
path
field in POST response does not contain the path:this is causing a problem in mobile clients: When public link is created, it is not reflected till parent folder is refreshed.
Setup
Container created with the following docker-compose file:
Additional context
Problem does not happen in oC10, where the path field contains the correct path.