How to Use Puppeteer to Upload a PDF to Supabase: Any Best Practices or Tips?

10 Replies, 2032 Views

Hey! I had a similar issue with puppeteer upload pdf to supabase. What worked for me was using the `page.uploadFile()` method in Puppeteer to handle the file selection, and then using Supabase's `storage.from().upload()` to push the file.

Also, make sure your Supabase bucket permissions are set correctly! I wasted hours debugging only to realize it was a permissions issue lol.

For error handling, wrap your upload logic in a try-catch block and log the errors. It’s saved me so much time.

Messages In This Thread



Users browsing this thread: 1 Guest(s)