Skip to content

Provide permissions and ownerId in PUT request when uploading a new file #54088

@mpivchev

Description

@mpivchev

On iOS and Android we need to handle some UI after we upload a file that requires us knowing the permissions for said file. This works in already PROPFINDed files, but a new file does not get PROPFINDed immediately for performance reasons. Currently we would have to fetch the whole metadata for a directory to know the permissions of new files, which is way too expensive, especially since we have to do this for every new file (imagine uploading 500 files at once).

Feature request:
After a PUT request for a new file we receive the e-tag and file-id. Is it possible to also receive the permissions and ownerId through that as well? This way we would not need to request the whole metadata for current directory every time.

An example would be Oc-Permissions: SVGDM and Oc-OwnerId: xxxxxxx in the header. It can also be part of the body.

Use case:

  1. We need permissions to determine which actions to show when a file is uploaded. Example is hiding the "Delete file" option when user has no delete permission. Another example is removing "Rename file" if file has no edit permission. This is not possible for a new file, as we did not PROPFIND it.

  2. We need the OwnerId to display owner the moment a file is uploaded. Currently a new file does not show owners until the list is refreshed and PROPFINDed.

Image

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions