Skip to content

/meta endpoint returns inconsistent file paths #8224

Closed

Description

@JuancaG05

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.

Activity

  1. changed the title [-]`/meta` endpoint returns inconsistent file names[/-] [+]`/meta` endpoint returns inconsistent file paths[/+] on Jan 17, 2024
  2. JuancaG05 commented on Jan 17, 2024

    @JuancaG05
    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>
    
  3. michaelstingl commented on Jan 22, 2024

    @michaelstingl
    Contributor

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

    @micbar could this be done?

  4. JuancaG05 commented on Jan 22, 2024

    @JuancaG05
    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.

  5. added
    Priority:p2-high
    on Jan 23, 2024
  6. moved this from Qualification to Prio 2 in Infinite Scale Team Boardon Jan 23, 2024
  7. micbar commented on Jan 23, 2024

    @micbar
    Contributor

    Release Blocker

  8. self-assigned this
    on Jan 24, 2024
  9. moved this from Prio 2 to In progress in Infinite Scale Team Boardon Jan 24, 2024
  10. aduffeck commented on Jan 24, 2024

    @aduffeck
    Contributor

    Fixed with the merge of #8278

  11. added this to the Release 5.0.0 milestone on Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Priority:p2-highType:Bug

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions