iFrame can't show preview of PDF file on Google Drive except in popout

My app has a Retool iFrame in which I want to display a PDF file stored on Google Drive (using the URL "https://docs.google.com/file/d/FILE_ID/preview"). However, the iFrame displays a spinning progress indicator forever unless the user clicks the iFrame's popup button, at which point the PDF file is successfully displayed in a new tab.

What could be causing the infinite progress indicator? I know the URL and file permissions are correct because the popup uses the URL to successfully open the file.

1 Like

Hey @Kyle_Blaney! Welcome back to the community. :slightly_smiling_face:

It sounds like you might need to toggle on the Storage and cookies option in the component inspector. Doing so enables the allow-same-origin flag on the resulting iframe.

I hope that helps!