Skip to content

Commit 65f9ce4

Browse files
authored
fix: use URL pathname to avoid name issue cause url query params
2 parents 965e94a + fc62294 commit 65f9ce4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/systems/ClientEditor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export class ClientEditor extends System {
239239
if (url.startsWith('http')) { // Basic URL validation
240240
const resp = await fetch(url)
241241
const blob = await resp.blob()
242-
file = new File([blob], url.split('/').pop(), { type: resp.headers.get('content-type') })
242+
file = new File([blob], new URL(url).pathname.split('/').pop(), { type: resp.headers.get('content-type') })
243243
}
244244
}
245245
} else if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {

0 commit comments

Comments
 (0)