I’ve seen many people on this forum looking for a way to preview .pdf/.docx etc. files stored in their Bubble apps in the browser (see links below).
Most of the solutions rely on embedding Google or Microsoft’s file viewer via an iframe (FYI this is a good resource for that) or using Zeroqode’s plugin. However, those solutions do not work for private files (i.e. the url to the file you want to preview is hidden from the web with Bubble’s Privacy Roles).
I’m trying to securely send my private Bubble files to FilePreviews.io via their API (and Bubble’s API connector) to generate the previews, but I don’t know how to give FilePreviews access to my files. I have the API calls working when the files are public (see images below), but not when private.
FilePreviews told me:
“we need to be able to download the file from the URL you give us. For example, if the file is hosted on S3 and it’s ACL is set to private, you’ll need to send us the URL signed for temporary access”
Does anyone know what do I need to do?
- Open up my app via API (not the API Connector) to FilePreviews?
- Somehow grant FilePreviews access another way? e.g. through the Privacy Roles themselves (I doubt this)
- Somehow do that FilePreviews said re giving them “temporary access” (probably along these lines, though I doubt that’s something we have access to from inside Bubble).
If someone can help me crack this, I’d be happy to post a step by step of how to set up FilePreviews.io with Bubble to help others.
Bubble API Connector calls working successfully when the files are public, but not when private:
Bubble forum posts discussing previewing files: