Update: Suggestion 2. from @kristian seems to work fine. I also tried converting to sting and back (suggestion 1.) but I could not get it working.
My code now looks like this:
uploadByFile(the_image) { window.the_blob = the_image return edjs.actions.save_image() .then((...args) => { const url = edjs.data.new_image.get() return { success: 1, file: { url } } }) },
And the action stores the image like this: