mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
Fix thumbnail creation on very large images or images with extreme dimensions (#332)
This commit is contained in:
parent
ab67c5858d
commit
00d2757fdc
3 changed files with 60 additions and 21 deletions
|
@ -281,10 +281,8 @@ class PeersUI {
|
|||
|
||||
if (files[0].type.split('/')[0] === 'image') {
|
||||
try {
|
||||
let imageUrl = await getThumbnailAsDataUrl(files[0], 80, null, 0.9);
|
||||
|
||||
let imageUrl = await getThumbnailAsDataUrl(files[0], 80, 80, 0.9);
|
||||
this.$shareModeImageThumb.style.backgroundImage = `url(${imageUrl})`;
|
||||
|
||||
this.$shareModeImageThumb.removeAttribute('hidden');
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue