Fix drag and drop image with embedded workflow on Firefox (#3519)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Christian Byrne
2025-04-20 10:19:48 +08:00
committed by GitHub
parent 9621b8f339
commit add805460c
4 changed files with 128 additions and 70 deletions

View File

@@ -481,9 +481,8 @@ export class ComfyApp {
if (match) {
const uri = event.dataTransfer.getData(match)?.split('\n')?.[0]
if (uri) {
await this.handleFile(
new File([await (await fetch(uri)).blob()], uri)
)
const blob = await (await fetch(uri)).blob()
await this.handleFile(new File([blob], uri, { type: blob.type }))
}
}
}