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

/meta endpoint returns inconsistent file paths #8224

Closed
JuancaG05 opened this issue Jan 17, 2024 · 5 comments
Closed

/meta endpoint returns inconsistent file paths #8224

JuancaG05 opened this issue Jan 17, 2024 · 5 comments
Assignees
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug
Milestone

Comments

@JuancaG05
Copy link

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.

@JuancaG05 JuancaG05 changed the title /meta endpoint returns inconsistent file names /meta endpoint returns inconsistent file paths Jan 17, 2024
@JuancaG05
Copy link
Author

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:

<oc:meta-path-for-user>/testing shares/example.md</oc:meta-path-for-user>

@michaelstingl
Copy link
Contributor

To be aligned with personal Space project Spaces and oC10 /meta endpoints, we'd need the leading / EVERYWHERE.

@micbar could this be done?

@JuancaG05
Copy link
Author

Here is a comparison of responses from the /meta endpoint to understand better the problem:

  • File in root folder in oC10
...
<oc:meta-path-for-user>/Portugal.jpg</oc:meta-path-for-user>
...
  • File in root folder in Personal space in oCIS
...
<oc:meta-path-for-user>/Portugal.jpg</oc:meta-path-for-user>
...
  • File in root folder in Project space in oCIS
...
<oc:meta-path-for-user>/Portugal.jpg</oc:meta-path-for-user>
...
  • File in root folder in Shares space in oCIS
...
<oc:meta-path-for-user>Portugal.jpg</oc:meta-path-for-user>
...
  • File in non-root folder in Shares space in oCIS
...
<oc:meta-path-for-user>/Folder/Portugal.jpg</oc:meta-path-for-user>
...

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-user property always starts with a /. So, as @michaelstingl states, we would need a leading / everywhere for it to be consistent.

@micbar micbar added the Priority:p2-high Escalation, on top of current planning, release blocker label Jan 23, 2024
@micbar micbar moved this from Qualification to Prio 2 in Infinite Scale Team Board Jan 23, 2024
@micbar
Copy link
Contributor

micbar commented Jan 23, 2024

Release Blocker

@aduffeck aduffeck self-assigned this Jan 24, 2024
@aduffeck aduffeck moved this from Prio 2 to In progress in Infinite Scale Team Board Jan 24, 2024
@aduffeck
Copy link
Contributor

Fixed with the merge of #8278

@github-project-automation github-project-automation bot moved this from In progress to Done in Infinite Scale Team Board Jan 24, 2024
@micbar micbar added this to the Release 5.0.0 milestone Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug
Projects
Archived in project
Development

No branches or pull requests

4 participants