[CWB] Set up images in text metadata
Daniel Wachter
wachter at cl.uni-heidelberg.de
Thu Jan 14 16:51:11 CET 2021
The admin manual says under "7.5.1 Free text":
"
Free text metadata fields are allowed to contain links to external
resources of one kind or another.
These are detected by examining the “prefix” of the field value, which
is the part of the value before
the first colon.
[...]
image
This is a link to an image file (of any kind that the browser can open,
including PDF for
instance). It will appear as a clickable control which, when clicked,
will load the image into an
overlay on the page.
Example: image:../images/orig-text-a1.pdf
"
In my experiments the image prefix works: The clickable control is
available in the text metadata and CQPweb tries to open the image but
can't find the file. Because the manual example uses a relative path, I
expected/hoped that I only would have to give CQPweb reading permissions
for the directory where the images are stored and then CQPweb would
handle the rest... Is this assumption wrong?
Best,
Daniel
Am 14.01.2021 um 16:17 schrieb Stefan Evert:
>
>> On 14 Jan 2021, at 15:36, Daniel Wachter <wachter at cl.uni-heidelberg.de> wrote:
>>
>> I try to integrate images in my corpus metadata as described in the admin manual p. 72 using the full path of the image files like "image:/var/cqp/upload/covers/7410.jpg". I tried to give cqpweb access to the images with "sudo chown -R root:www-group /var/cqp/upload/covers/" but there's something wrong with the path: When I try to open an image in the installed metadata cqpweb gives me "The requested URL was not found on this server".
> The image link isn't handled by CQPweb but rather passed through to the client browser. So you need to provide a public URL (i.e. http: or https:) where the browser can download the image file.
>
> "image:" isn't a valid URI scheme as far as I know – where did you find this format?
>
>> How can I give cqpweb access to my image files or where should I place them? Or is this rather a question of my server configuration and has nothing to do with cqpweb per se?
> The usual solution is to make the image files available on your Web server (possibly password protected) independently of CQPweb, and then construct appropriate URLs and insert them in the corpus metadata.
>
> Best,
> Stefan
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
More information about the CWB
mailing list