Render downloaded content in iframe

Render downloaded content in iframe

BY 12 Sep 2023 Web Application Development

I can’t manage to render a downloaded html file in an iframe.

 

The script downloads a zip file, unzips it and then I get the URI of the index.html file that has been unzipped. This works well, but when I add that uri to the iframe src it only shows a white page.

 

So this doesn’t work:

<iframe src=”file:///opt/usr/home/owner/content/Downloads/path/to/unzipped/folder/index.html” />

 

I tried adding the same index file to the project and render it like this which works well:

<iframe src=”./test.html” />

 

I didn’t manage to get any logs from the device since I can’t connect with sdb. Anyone who can help me understand this issue? Do I need a specific permission to render downloaded content in iframes?

 

Written by