Created
September 25, 2021 12:18
-
-
Save m1r4z/2a035491b1eed894c57b19e1b781a53d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let temp1; | |
console.log(1); | |
fetch(url) | |
.then((res) => res.blob()) | |
.then((data) => { | |
let metadata = { | |
type: "image/png", | |
}; | |
temp1 = new File([data], "test.png", metadata); | |
}); | |
let container = new DataTransfer(); | |
container.items.add(temp1); | |
let inputForm = document.querySelector("input.mkhogb32"); | |
inputForm.files = container.files; | |
inputForm.dispatchEvent(new Event("change", { bubbles: true })); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment