Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fossil: how to display checked in image files on wiki pages?

Here is the complete workflow:

Initialize the repository and the workspace

$ fossil new repo.fossil
$ mkdir workspace
$ cd workspace
$ fossil open ../repo.fossil

Add an image file to the repository

$ fossil add image.jpg
$ fossil commit -m "added image.jpg"

Start fossil server:

$ fossil server

Open the web interface in the browser:

BROWSERNAME 127.0.0.1:8080

Now I'd like to get image.jpg displayed in a wiki page.

Things I've tried:

[image.jpg]
<img src="image.jpg">

I've also tried to toggle the "Use HTML as wiki markup language" in Admin->Configuration

like image 941
nm3 Avatar asked Oct 20 '10 23:10

nm3


2 Answers

see this page. You should use <img src='/doc/tip/image.jpg'/> I believe.

like image 64
Benoit Avatar answered Nov 02 '22 18:11

Benoit


I got it to work, though through a roundabout process.

Once you've checked in an image, find it in the Files section of your "fossil ui", click it, and see that it displays the image there for you. From there, you can take the URL of that image (in Chrome, right-click it, "Copy image URL". In my test, that URL was http://localhost:8081/raw/2c2e13a1f71295c3?m=image/jpeg

Then edit your wiki page and add, for example:

<img src="http://localhost:8081/raw/2c2e13a1f71295c3?m=image/jpeg"/>
like image 26
feuGene Avatar answered Nov 02 '22 19:11

feuGene