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
Upload file doesn't work because website's CSP declines data urls #5507
Comments
For folks coming to this, you can use DOM.setFileInputFiles as a possible strategy. Though I would like to see puppeteer support that through it's methods rather than converting the file to data URL. |
I think that would be a good idea. A lot of issues have happened since that I think can be attributed to this change. Also, I understand the commit message but I am unable to understand where is that case applicable. Was this causing issues when doing i18n input fields or something similar? |
I am also very curious to understand why page.setBypassCSP didn't work for this. |
Hey @sivasait-opex Here's a sample for using CDP for animations. https://github.com/puppeteer/puppeteer/blob/v2.1.1/docs/api.md#class-cdpsession |
Sorry, the error is pretty self explanatory. You should be able to figure out more from the error message. |
This should be fixed as of 532ae57 since we use |
Steps to reproduce
Tell us about your environment:
What steps will reproduce the problem?
Please include code that reproduces the issue.
What is the expected result?
File gets uploaded properly and is not blocked by CSP
I think this might be outside the scope of puppeteer team but I was wondering if there are ways to get around this. Thanks!
The text was updated successfully, but these errors were encountered: