mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: prepare jsHandle.uploadFile for CDP Page.handleFileChooser removal (#5196)
* fix: prepare jsHandle.uploadFile for CDP Page.handleFileChooser removal https://chromium-review.googlesource.com/c/chromium/src/+/1935410 removes Page.handleFileChooser from the CDP. * fix: improve binary file support UTF-8-decoding the input file could fail for binary files, and so we now read the raw file buffer and base64-encode it. To base64-decode it within the page context, we use the Fetch API in combination with a data URL. This requires knowing the proper MIME type for the input file, which we now figure out using the new mime-types dependency.
This commit is contained in:
@@ -30,10 +30,12 @@
|
||||
"author": "The Chromium Authors",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@types/mime-types": "^2.1.0",
|
||||
"debug": "^4.1.0",
|
||||
"extract-zip": "^1.6.6",
|
||||
"https-proxy-agent": "^3.0.0",
|
||||
"mime": "^2.0.3",
|
||||
"mime-types": "^2.1.25",
|
||||
"progress": "^2.0.1",
|
||||
"proxy-from-env": "^1.0.0",
|
||||
"rimraf": "^2.6.1",
|
||||
|
||||
Reference in New Issue
Block a user