[Cubicweb] Preview with ViewerJS in CW
stephane.bugat at free.fr
Sun Apr 3 11:58:52 CEST 2016
>> Christophe, this did not work neither... However the error message is
>> now "cette ressource est introuvable" (bad resource location). The
>> number of parent dirs '../' does not have any effect.
> Is this message displayed by ViewerJS which try to access the resource,
> or by the browser who cannot load ViewerJS itself ?
> If the former, try adding/removing '../'s, and have a look at the
> 'network' tab of the browser devtools so you get an idea of what URL the
> viewer is actually hitting.
> If the later, where did you extract ViewerJS sources ?
Christophe, thanks for those tips. ViewerJS was extracted into the data/
directory of the cube. Viewing
gives no error (but displays an empty view). The network tab of the
devtools shows that the GET of index.html is OK.
I've tried to copy foo.pdf into the data/ directory and view
(so that the PDF file is no more in the database but in an accessible
part of the cube), but the GET method always returns an error 403
(forbidden). This is also independant of the number of '../'. Removing
'index.html' does not change anything. Trying to view any other
accessible file (for instance those in wdoc/) always gives the same error...
More information about the Cubicweb