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

Use public preview API #2926

Closed
jesmrec opened this issue Aug 10, 2020 · 1 comment · Fixed by #3017
Closed

Use public preview API #2926

jesmrec opened this issue Aug 10, 2020 · 1 comment · Fixed by #3017
Assignees
Milestone

Comments

@jesmrec
Copy link
Collaborator

jesmrec commented Aug 10, 2020

Currently (2.15), Android is using only thumbnails as part of the previews. (private API)
Request is api/v1/thumbnail/448/448/<path>(private thumbnail API)

It could switch to the the public preview API:
remote.php/dav/files/[user]/[file]?x=[width]&y=[height]&c=[eTag]&preview=1
(but there's no real urgency)

x and y parameters contains 120 in iOS platform (as reference)

  • AC (keep legacy behaviour):

    • Thumbnails are correctly fetched, no matter if picture is downloaded or not
    • Thumbnails are requested once browsing
    • Thumbnails are shown in the uploads view.
    • Thumbnails are shown in the folder picker (copy, move options)

PR

App: #3017

@michaelstingl michaelstingl changed the title Preview API Use public preview API Aug 10, 2020
@michaelstingl michaelstingl added this to the 2.16-current milestone Sep 30, 2020
@abelgardep
Copy link
Contributor

I was checking the api and the current implementation, and we can switch to the public preview api in a pretty simple way.

About the public preview api, i think that Content-Length header is missing.

x and y parameters contains 120 in iOS platform (as reference)

About the thumbnails size, currently we retrieve a 448x448 which is much bigger than that reference. I have performed a quick test and for the same image:

  • 120x120 -> 4Kb
  • 448x448 -> 35Kb

We have better thumbnails but maybe they are not as much important. Should we decrease thumbnails size? Admins can limit their size anyway

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

Successfully merging a pull request may close this issue.

3 participants