Skip to content

Conversation

@provokateurin
Copy link
Contributor

The server generates the preview using cover mode, so the local preview of the new file should do the same.
Also the preview was always distorted, I believe this was due to background-size not applying to the image.
To fix this I had to use object-fit instead.

Before:
image

After:
image

@codecov
Copy link

codecov bot commented Jan 15, 2025

Bundle Report

Changes will decrease total bundle size by 72 bytes (-0.01%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@nextcloud/upload-esm 397.02kB 36 bytes (-0.01%) ⬇️
@nextcloud/upload-cjs 400.38kB 36 bytes (-0.01%) ⬇️

@provokateurin provokateurin merged commit 2260bec into main Jan 15, 2025
18 checks passed
@provokateurin provokateurin deleted the fix/nodespicker/preview-fit-cover branch January 15, 2025 16:33
@skjnldsv skjnldsv added bug Something isn't working 4. to release Ready to be released and/or waiting for tests to finish design Related to the design labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug Something isn't working design Related to the design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants