Category: UI Widgets
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Iframe issue due to Content Security Policy

Issue

I am having trouble sending a PDF file created in my app's iframe to the user, due to the content security policy. I cannot present the file for download in the iframe, and using parent.postMessage is not working. I need a workaround for this issue.

Resolution

One of Appsmith's users encountered an issue with sending a PDF file created with jsPDF from an iframe to the user, due to the content security policy restrictions. Appsmith's solution was to update the iframe to allow for all hosts, data URIs, and blobs. This will automatically resolve the issue and allow the user to send the PDF file without any workarounds.

Code examples are not necessary for this solution.