Skip to content

Commit e9821f7

Browse files
authored
fix(browser): use data: protocol on preview provider file upload (#6501)
1 parent 91442df commit e9821f7

File tree

1 file changed

+1
-1
lines changed
  • packages/browser/src/client/tester/locators

1 file changed

+1
-1
lines changed

packages/browser/src/client/tester/locators/preview.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class PreviewLocator extends Locator {
9494
mime: string
9595
}>('__vitest_fileInfo', file, 'base64')
9696

97-
const fileInstance = fetch(base64)
97+
const fileInstance = fetch(`data:${mime};base64,${base64}`)
9898
.then(r => r.blob())
9999
.then(blob => new File([blob], basename, { type: mime }))
100100
return fileInstance

0 commit comments

Comments
 (0)