How can I use Puppeteer to upload a PDF to Supabase? or Best way to upload a PDF to Supabase using Pu

14 Replies, 1525 Views

If you’re generating the PDF with puppeteer, skip the file step entirely! Just grab the buffer from `page.pdf()` and push it straight to Supabase storage.

Code:
```javascript
const pdf = await page.pdf({ format: 'A4' });
await supabase.storage.from('bucket').upload('output.pdf', pdf);
```
No temp files, no fuss. Works every time for me.

Messages In This Thread



Users browsing this thread: 1 Guest(s)