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

Do not regenerate the preview on a rename #7700

Closed
MorrisJobke opened this issue Jan 4, 2018 · 1 comment
Closed

Do not regenerate the preview on a rename #7700

MorrisJobke opened this issue Jan 4, 2018 · 1 comment
Assignees
Labels
enhancement papercut Annoying recurring issue with possibly simple fix.
Milestone

Comments

@MorrisJobke
Copy link
Member

  • having a file with a preview
  • rename the file
  • actual: preview is hidden behind a spinner and then downloaded again
  • expected: preview just stays

The reason for this is, that the preview is actually requested based on the filename and not on the fileid (it is nevertheless stored under the fileid and thus not re-generated).

Before and after rename URL:

http://192.168.99.100/server/core/preview.png?file=%2FBildschirmfoto+2017-11-30+um+23.09.2822.png&c=64e26567fd27cdb34123247436d80d29&x=32&y=32&forceIcon=0
http://192.168.99.100/server/core/preview.png?file=%2FBildschirmfoto+2017-11-30+um+23.09.28224.png&c=64e26567fd27cdb34123247436d80d29&x=32&y=32&forceIcon=0

cc @rullzer @nextcloud/javascript

@MorrisJobke MorrisJobke added enhancement papercut Annoying recurring issue with possibly simple fix. labels Jan 4, 2018
@rullzer
Copy link
Member

rullzer commented Jan 4, 2018

Well yes. Solution would be to create a new endpoint that accepts a file id. This would not be hard to do. (actually fairly easy).

This might be enough. Since then the browser knows the fileid hasn't changed so the fetch of the preview is instance (since we cache it :P)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement papercut Annoying recurring issue with possibly simple fix.
Projects
None yet
Development

No branches or pull requests

2 participants