Repository navigation
Description
Related to:
Describe the bug
When I ask the /meta endpoint for a file in the root folder in my personal space (or any project space), the response contains something like:
<oc:meta-path-for-user>/file.jpg</oc:meta-path-for-user>
But when I ask this endpoint for a shared file with me, that is, a file in the root folder of my shares space, the response contains something like:
<oc:meta-path-for-user>file.jpg</oc:meta-path-for-user>
There is a slight but important difference: the first one has a slash (/) indicating it is in the root folder of the corresponding space, but the second one doesn't. I don't know if it is a bug or it is intended, but if it's going to be changed in the future would be good to know now to avoid crashes in the clients, since it implies a change in some algorithms (at least in the Android app).
Steps to reproduce
Check #8033 (comment).
Expected behavior
The response is consistent with other files requested and returns the oc:meta-path-for-user property as a path located from the root folder of the shares space:
<oc:meta-path-for-user>/file.jpg</oc:meta-path-for-user>
Actual behavior
The oc:meta-path-for-user property returns just the name of the file and not the slash (/) before, that indicates it is located in the root folder of the shares space:
<oc:meta-path-for-user>file.jpg</oc:meta-path-for-user>
Setup
I'm using ocis-traefik.latest, redirected from https://ocis.owncloud.works:
ownCloud Web UI 8.0.0-rc.1
Infinite Scale 5.1.0-prealpha+b758d2860 Community
Additional context
As I stated before, I don't really know if this is a bug or not, but would be good to clarify because it could be a blocker for some issues in the different clients.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]`/meta` endpoint returns inconsistent file names[/-][+]`/meta` endpoint returns inconsistent file paths[/+]JuancaG05 commentedon Jan 17, 2024
UPDATE:
I just checked with a file inside a folder in the shares space, and in this case meta DOES return the file path with the
/at the beginning:michaelstingl commentedon Jan 22, 2024
To be aligned with personal Space project Spaces and oC10
/metaendpoints, we'd need the leading/EVERYWHERE.@micbar could this be done?
JuancaG05 commentedon Jan 22, 2024
Here is a comparison of responses from the
/metaendpoint to understand better the problem:So, we can see that the problem is in files located directly in root folder in Shares space in oCIS accounts. In the rest of the cases, the
oc:meta-path-for-userproperty always starts with a/. So, as @michaelstingl states, we would need a leading/everywhere for it to be consistent.micbar commentedon Jan 23, 2024
Release Blocker
aduffeck commentedon Jan 24, 2024
Fixed with the merge of #8278