Skip to content

Feature 'indicate if file has preview' doesn't support search (/report) nor graph sharing api #1133

Closed

Description

@AlexAndBear

Describe the bug

With opencloud-eu/reva#214, we can fetch oc-has-preview dav property to get knowledge wether we can a generate a thumbnail or not 👍 .

But this doesn't work with search (/report endpoint) or graph sharing api (/graph/v1beta1/me/drive/sharedWithMe and graph/v1beta1/me/drive/sharedByMe)

Steps to reproduce

Expected behavior

A clear and concise description of what you expected to happen.

Actual behavior

A clear and concise description of what happened.

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

Details

OC_XXX=somevalue
OC_YYY=somevalue
PROXY_XXX=somevalue

Additional context

Add any other context about the problem here.

Activity

  1. AlexAndBear commented on Jun 27, 2025

    @AlexAndBear
    MemberAuthor
  2. butonic commented on Jun 27, 2025

    @butonic
    Member

    in the graph api we could indicate that thumbnails can be generated by returning an empty thumbnails relation when the user expands it: https://learn.microsoft.com/en-us/graph/api/driveitem-list-thumbnails?view=graph-rest-beta&tabs=http#getting-thumbnails-while-listing-driveitems

    GET /me/drive/items/{item-id}/children?$expand=thumbnails
    

    We can even allow custom resize sizes and algorithms: https://video2.skills-academy.com/en-us/graph/api/driveitem-list-thumbnails?view=graph-rest-1.0&tabs=http#requesting-custom-thumbnail-sizes

    The exmple uses c300x400_crop. We could pass that to a thumbnailer service to allow whatever algorithm it supports: https://github.com/jameesjohn/imaginary?tab=readme-ov-file#supported-image-operations ... we could even add an ``libre.graph.thumbnail.filters` property to let the ui determine which filter to use ... say to create simple effects? or to add watermarks? depending on what the image service supports.

    Ok, that is something for the future, but we can start by returning an empty thumbnails property or leaving it out when know we cannot generate thumbnails for the filetype. The client side can then check with item.hasOwnProperty('thumbnails') if it should try to generate an image.

    now ... the question is if we should return the availabe thumbnails ... that could get expensive for large directories ...

    well ... we could just fake the default thumbnail sizes and return presigned urls ...

  3. AlexAndBear commented on Jun 28, 2025

    @AlexAndBear
    MemberAuthor

    One more thing I noticed, even if it doesn't make any difference in the client implementation, folders don't have the attr. Is this something that have been left out on purpose or do we want to add this to folders (hard coded 0), just for consistency reasons?

    cc @micbar

  4. moved this from Qualification to Backlog in OpenCloud Team Boardon Jul 3, 2025
  5. micbar commented on Jul 4, 2025

    @micbar
    Member

    And we need a libre graph api implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions