Working with Thumbnails BEFORE images were uploaded

Started by RoseAsbenhe2 replies974 views
RoseAsbenheOriginal post
#1

Hey there!

I want to try something: My users should be able to upload up to 500 images at once. Is it possible with Uppy that I can display thumbnails of these images BEFORE they were uploaded? They basically should just look at them or maybe rotate them in a Canvas

kvzTransloadit team
#2

Hi!

Yes this should already work (except for rotating images) have you tried it? If you’re running into anything we’d love to know

RoseAsbenhe
#3

Hey kvz! Thanks for the information, so I guess I can try to use uppy in general 🙂

What I need: to use the thumbnails of uppy and use the image data of the blob object in another canvas DOM Element on the website, but not inside the dashboard.

So basically:

const canvas = document.getElementById('anyCanvasElement');
const image = new Image();
image.src = "blog:http:.......";
canvas.width = image.width;
canvas.height = iamge.height;
const ctx = canvas.getContext('2d');
ctx.drawImage(image, 0, 0, image.width, image.height);

But since this is the first time I’ve got a project with file uploads, I’m not sure if this is a good idea.