Preview HTML file from S3

Hi! I want to preview an HTML file similar to the JSON preview in S3 File Explorer Template | Retool. Is this possible?

Thanks!

I assume you mean that you want to view the HTML source code? If so, this seems to work fine for me:

If you just want to view the rendered page, you can load it in an iframe component.

Thank you for your reply! I'm trying to render the page.

Using an iFrame worked, except that the S3 bucket I'm pulling from blocks all public access.

So I added a button to get a resigned URL, but now I'm unsure how to download the file from the link and preview it... any ideas?

1 Like

Sorry, I don't have much experience with S3 that is not public access. Hopefully someone else will be able to give you some ideas.

Can you input the signed URL in the iFrame src field?

I attempted that, but the signed URL is a link to download the file.

check if your bucket is public

i have the same issue, im assuming its because public access is blocked, any help will be good this is my current settings:

i tried to change private to public-read in ACL, but same

Hey @adamtilton!

Once you have the signed URL if you make a GET request to it from a generic REST API you should be able to retrieve your file without CORS issues:

From there, you can pass the rawXml property to an HTML component to render it:

Can you let me know if that works?