So,i have an iframe tag inside a bootstrap modal window that has as its src a PDF file located in the public folder of my rails app. The problem is that everytime i deploy the app to Heroku, and access it using a mobile device (tablet and smartphone), the browser simply download this PDF file automatically.
This is the modal window with the iframe in it:
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></br>
<h4 class="modal-title" id="myModalLabel"><span class="glyphicon glyphicon-calendar"></span> Agenda de Aulas - 12/2015</h4>
</div>
<div class="modal-body">
<iframe id="modalframe" src="calendar.pdf"></iframe>
</div>
</div>
</div>
</div>
At the same time, the pdf doesnt show up in the modal when its accessed using a mobile device. It only shows up on bigger screens. Maybe it has something to do with the file being downloaded, i dont know.
I've been searching a lot, but couldnt find an answer so far. What can i do to solve this? Thanks!