Hi guys,
I'm facing an issue with a React app I've deployed on AWS S3, where I've embedded certain 3rd party web apps using iframes. Everything seems to work well, but I've run into a challenge when trying to open the file upload feature from within the iframe.
Context:
I've ensured the S3 bucket has a policy to allow public reads ( In fact, everything works well except the file upload popup).
The iframes load content from domains like subdomain1.website.co.uk, subdomain2.website.co.uk, etc.
I've added allow="file-handling" to the iframe in hopes of enabling file access, but it doesn't seem to help.
Relevant part of the code:
<iframe
id="contentFrame"
src={currentUrl}
style={{
marginLeft: "2.5%",
marginRight: "2.5%",
width: "95%",
minHeight: "80vh",
border: "none",
overflow: "auto",
transform: "scale(0.95)",
transformOrigin: "center center",
allow: "file-handling",
}}
loading="lazy"
/>
Given the above, do you have any insights or suggestions on how I can enable file uploads from within the iframe? Are there security or browser-specific restrictions that I might be overlooking? Is there any workaround?