Skip to content

Commit

Permalink
fix(browser): use data: protocol on preview provider file upload (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin authored Sep 25, 2024
1 parent 91442df commit e9821f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/browser/src/client/tester/locators/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class PreviewLocator extends Locator {
mime: string
}>('__vitest_fileInfo', file, 'base64')

const fileInstance = fetch(base64)
const fileInstance = fetch(`data:${mime};base64,${base64}`)
.then(r => r.blob())
.then(blob => new File([blob], basename, { type: mime }))
return fileInstance
Expand Down

0 comments on commit e9821f7

Please sign in to comment.