displaying pdf attachment inline, in the view (problem with browsers on Windows)
arta opened this issue · 2 comments
This is not an attachment_fu issue, I think, but somebody here may know what the problem is.
I have my attachments in the cloud. When I want to display an attached file in my rails app's view, I write (in the view, haml):
= image_tag @model.attachment.public_filename
and the attachment (image or pdf) is neatly displayed inline in the view.
But this only works on a Mac. The same page accessed from a browser running on Windows displays broken image holder for pdf attachments (no problem with images).
Why is that? How to fix that? How do I display a pdf attachment inline in a browser on Windows? I've searched around and found nothing. So, I post the question here.
Suggestion and help appreciated,
Thanks,
martin
Thanks, would you know the plugin? The broken image icon appears on Windows only. Browsers running on MacOS display the pdfs as if they were images (which in a sense they are, those are scanned documents, pdf takes up less memory then jpg). If this is not a bug, then what image tag handles is a matter of opinion/interpretation. After all, it's not like there are natural laws governing the contents of HTML tags. Or maybe there is a need for a doc tag?