Get file from page URL (from Airtable)

Hey fellow Bubblers,

I am working on an app for a client and have been running into an issue I hope you can help me with.

In the app, I use the plugin PDF previewed to enable users to view some files.

On the admin side, the client uses Airtable as a CRM and stores its documents in there. To quickly enable him to add documents from Airtable, I have created a page on the bubble app and added it to a field in the Airtable base where I add parameters to pass the document’s information (name, type, some others), as well as the attachment which goes into the file uploader input automatically.

Although, when doing this, the PDF previewed gives me an error message
"PDF.js v2.0.943 (build: dc98bf76)
Message: Unexpected server response (403) while retrieving PDF "

I have also tried this by extracting the URL of the attachment in Airtable and pass it as the parameters and in the file uploader. Only this time, it gives me a different error message:
PDF.js v2.0.943 (build: dc98bf76)
Message: file origin does not match viewer’s"

I kind of see what’s wrong as it works fine when I manually upload a file on the bubble app page (gives an //s3.amazon link of sorts) but haven’t found a solution to automatically do it from Airtable and the URL parameter.

I looked at the AWS file uploader plugin from Zeroqode but not sure if that would be the solution.

Thank you for your help in advance

1 Like