[Cubicweb] Preview with ViewerJS in CW
stephane.bugat at free.fr
Fri Apr 1 18:49:44 CEST 2016
Le 31/03/2016 22:08, Christophe de Vienne a écrit :
> I guess it is because the Viewer is actually in the index.html file,
> which cubicweb will not return when accessing ViewerJS/.
> Try adding 'index.html' explicitely.
> You may also need to change the '#..' into '#../../..' since the viewer
> is in a subpath.
> The resulting code would be:
> href = _cw.data_url('ViewerJS/index.html') + '#../../..' + path
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.
I have to admit that the mechanism used by ViewerJS to capture the file
to be viewed is not clear to me...
More information about the Cubicweb