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
[BUG] Filetype is not detected on setInputFiles #5543
Comments
Related to : #5358 ? Had same issues, enforced Pptr 2.0 and works ok, 2.1.0 introduce the mimeType bug |
Yeah, it is. Thanks for pointing it out! |
@mathiasbynens please could you take a look? |
@paullewis is gonna take a look at the remaining filepicker problems: #5654 |
This should be fixed in 532ae57. const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('about:blank');
await page.setContent('<input type="file">')
const el = await page.evaluateHandle(() => document.querySelector('input'));
await el.uploadFile('avatar.jpg')
const type = await page.$eval('input', picker => picker.files[0].type);
console.log(type); // image/jpeg
await browser.close();
})(); |
Context:
Puppeteer Version: 2.1.1
Operating System: MacOS
Expected:
filetype to be image/jpeg
Actual file:
The file is not empty but the file type is not detected. There is a second parameter of filetype in setInputFiles where I can specify a filetype. However, I assume this is a bug because the same test passes for older versions.
The text was updated successfully, but these errors were encountered: