I have the following Codepen: https://codepen.io/Jsbbvk/pen/vYeRBZy
const onClick = async () => {
const blob = await (await fetch("https://source.unsplash.com/random")).blob()
const file = new File([blob], 'img', {type: blob.type})
navigator.share({title: 'image', text: 'image', files: [file]})
}
document.getElementById("share").addEventListener("click", onClick)
On mobile, this is what it looks like when you press the button
There is no preview of the image before sharing it. Below is the intended result (which was achieved by long-pressing a random image and pressing “share”)
Is there a way to achieve this image preview?