"The "Download PDF" button triggers a

"The "Download PDF" button triggers a direct download. Unfortunately, Puppeteer running in a Cloudflare Worker environment does not have direct support for file downloads." Is this true? Or is the AI hallucinating. I'm trying to download a pdf that does not come as a network payload, but is generated client side with js
2 Replies
JFK
JFKOP4mo ago
so this is my approach but with a test-website that I'm not actually interested in. Would greatly appreciate any ideas, I've been stuck on this for days
JFK
JFKOP4mo ago
that was just a testing website. The website I'm actually interested in does not display the data in the code. It only triggers a download that I fail to intercept. AI: "The error you're encountering: Error capturing PDF buffer: Could not load body for this request. This might happen if the request is a preflight request. occurs because Puppeteer cannot access the response body of a download initiated by the browser. When a response includes a Content-Disposition: attachment header (which is used for file downloads), Puppeteer doesn't provide access to the response body via response.buffer(). This is a known limitation due to how browsers handle file downloads—they treat them differently from regular HTTP responses, and the response body isn't exposed to the page's JavaScript context or Puppeteer."
Want results from more Discord servers?
Add your server