Fix issue with drag and drop tokens from a url not loading

This commit is contained in:
Mitchell McCaffrey 2021-08-07 10:19:31 +10:00
parent d7bd8876e2
commit 37405cac60

View File

@ -56,7 +56,10 @@ function useImageDrop(
}
const response = await fetch(url);
if (response.ok) {
const file = new File([await response.blob()], name);
const blob = await response.blob();
const file = new File([blob], name, {
type: blob.type,
});
if (supportFileTypes.includes(file.type)) {
imageFiles.push(file);
} else {