Fix issue with drag and drop tokens from a url not loading
This commit is contained in:
parent
d7bd8876e2
commit
37405cac60
@ -56,7 +56,10 @@ function useImageDrop(
|
|||||||
}
|
}
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
if (response.ok) {
|
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)) {
|
if (supportFileTypes.includes(file.type)) {
|
||||||
imageFiles.push(file);
|
imageFiles.push(file);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user