New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.1.0 and 2.1.1 uploadFile failing #5420
Comments
…al (#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.
I can confirm that it works properly with |
Same here, uploads fail with 2.1.1 |
This works for me as workaround on: const uploadInput = await page.$(someSelector)
const filePath = path.join(__dirname, fileRelativePath);
await uploadInput.uploadFile(filePath);
await page.evaluate((inputSelector) => {
document.querySelector(inputSelector).dispatchEvent(new Event('change', { bubbles: true }));
}, someSelector) So maybe something like #5446 is in order? |
Same issue. And workaround with uploadFile for input element does not work for our site, because we use custom inputs. Anyway it needs to be fixed. |
Hi everyone. Guys, is there any progress? |
… to latest version. Living on the edge :) Can't upgrade puppeteer for now, due to puppeteer/puppeteer#5420 It should be fixed with 2.1.2 release.
This should be fixed as of 532ae57 as we changed the underlying implementation to use |
I have this code: (via codeceptjs)
In in 2.0.0 this works but in 2.1.0 and 2.1.1 this no longer works.
The text was updated successfully, but these errors were encountered: