Closed drlivingston closed 9 years ago
Ideally I would think the tools should observe the content-type header if provided, wouldn't that be best?
ViewerJS 0.5.5 got released today, which features an initial HEAD request to learn about the content type, and also as fallback dropping the arguments from the passed document url, as proposed also above. Additionally the type can be set by passing an argument to ViewerJS itself, e.g. like /ViewerJS/index.html?type=pdf#/test/pdf/demodoc.pdf?foo=bar
.
These approaches should enable to solve the problem reported in this issue, thus closing it now.
If I have a dynamically generated / custom served PDF (because I have to use URLs that expire and that verify security settings in the session before serving content) I have issues with the type detection:
This works as expected:
This does not work:
This hack with a parameter I don't look at forced on the end does:
I think the problem is here:
this function assumes that there are no parameters
The following might fix this: