title: How to load PDF file inside of iFrame? Working in React
body: <p>I'm trying to load pdf file inside of iFrame in REACT, the code looks like this:</p>
  
  <pre><code>render(){
     return(
        &lt;iframe
            sandbox="allow-same-origin allow-scripts allow-forms"
            title="PortletIFrameWidget"
            src={'.resources/crayola.pdf'}
            ref={(f) =&gt; { this.ifr = f }}
        /&gt;
     )
  }
  </code></pre>
  
  <p>and I'm getting a warning:</p>
  
  <blockquote>
    <p>Resource interpreted as Document but transferred with MIME type
    application/pdf: "<a href="http://localhost:8080/resources/crayola.pdf" rel="noreferrer">http://localhost:8080/resources/crayola.pdf</a>"</p>
  </blockquote>
  
  <p>but when I go to the link: <em>"<a href="http://localhost:8080/resources/crayola.pdf" rel="noreferrer">http://localhost:8080/resources/crayola.pdf</a>"</em> I can easily see the content of PDF, so there is the pdf file, the problem is: it's not being uploaded/rendered in iFrame. Why?</p>
  
  <p>THIS WORKS IN MOZILLA FIREFOX, AND IN EDGE, but not in CHROME.</p>
  
  <p>any idea why is this happening? And how to load PDF file in iFrame in REACT</p>