Skip to content

[FEATURE REQUEST] Update space image #4691

Description

@jesmrec

Every space has a representative image as presentation. The app should be able to offer users the ability of changing the space image.

AC:

  • New option in the bottom menu: Edit image. Permission level required to perform the action: "libre.graph/driveItem/permissions/update",. Available in graph/v1beta1/drives/<drive-id>/root/permissions endpoint. As checked in the web, only space manager users seem to be able to edit the image, regardless the platform role.

  • By choosing that option, the user can pick an image from the system to be set as space image. Only one

  • The selected image will be pushed to the server to the folder /dav/spaces/<drive-id>/.space/, by using an authenticated PUT request, adding the image content to the payload.

  • Once pushed, a PATCH operation to graph/v1.0/drives/<drive-id> needed to set the pushed image as space image. The PATCH request will include in the payload:

{
    "special": [
        {
            "id": "<file-id>",
            "specialFolder": {
                "name": "image"
            }
        }
    ]
}
  • The accepted image formats are: JPEG, JPG, PNG, BMP and GIF
  • Errors: regular errors (connection, server unreachable...).

Extra ball: set an emoji as image

TASKS

  • Research (if needed)
  • Create branch feature/update_space_image
  • Development tasks
    • Add a menu option to update the space image
    • Open SAF with some restrictions: only images and multi-selection not allowed
    • Upload the chosen file to /.space directory
    • Update the space image using the PATCH operation to graph/v1.0/drives/<drive-id>
    • Implement unit tests (if needed)
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch feature/update_space_image into master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions