editor-js / image

Image Block for Editor.js
MIT License
234 stars 282 forks source link

How to pass temporary url #249

Open Complexlity opened 3 months ago

Complexlity commented 3 months ago

I have set up and uploader that returns a url and this works well. However, I don't want to have to upload the image each time the user inserts or removes. I want to use a temporary url

let tempFileUrl = URL.createObjectURL(file);

This creates a url: "blob:http://localhost......". This works when working with DOM elements but If I pass this to the image uploadByFile result

return { success: 1, file: tempFileUrl }

It just keeps loading