Iframe to embed an html document

Hello there,

I would like to embed a Sozi presentation (html document) in Discourse but it does not work. (nothing appear in the post)

The code should be (see here) :

<iframe class="sozi" src="http://sozi.baierouge.fr/presentations/this-is-not-a-slideshow.sozi.html">
    Your browser cannot display this content.

I presume that if I upload the Sozi html document first in the post and use its Discourse upload URL there should be no problem with the allowed iframe parameter?

Thanks for your help!

One issue may be the insecure URL … it’s using ‘http’.

My console reports that content to be blocked because of this (the site I tested it on is secured with https)

The page at 'https://www.mycoolsite.com/t/new-iframe-test/46' was loaded over HTTPS, but requested an insecure resource 'http://sozi.baierouge.fr/presentations/this-is-not-a-slideshow.sozi.html'. This request has been blocked; the content must be served over HTTPS.

Thank you, but I’m not convinced, since my first try was with a presentation of my own, that I uploaded inside discourse. Thus it was in https :

<iframe src="https://mydiscourse.com/uploads/default/original/1X/b0a38624276ef8cddd85d6c2d0faad0ac3eb81ae.html">
      My presentation

Now you are making a big assumption.

For that content to work it probably needs a massive JavaScript script (confrmed, i’ve just looked at it) Uploading the document almost certainly won’t allow the script to run (imagine if your users were allowed to upload random javascript!)

You could try to create a Theme Component and include the script …

… but that’s not going to create a situation where people can upload presentations of this type in an ad-hoc fashion.

OK, I understand now. Thanks.

To begin to solve it please ask that site to upgrade to https (why the heck not, its 2018, its more secure, and its free to do so) … then retest.

Let me link something similar that works:

You will note the linked web page is https enabled.

Should be difficult to ask for https…
Instead I propose to upload the test document here… (89 ko). That would be exactly the same conditions as mine. Problem: I’m not able to upload an html file.

Hi @merefield,

I have done another test, with a proper external https URL and you are right : it works ! Thanks ! :slight_smile:

1 Like

Awesome. Glad that’s resolved. :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.