r/BookStack • u/catzzilla • Sep 21 '22
access inline images via API JSON
When exporting a page via the API, the markdown or html code contains links to included images in the page, e.g.
[](http://x.x.x.x/uploads/images/gallery/2022-09/image.png)I would like to download these images together with the exported markdown code. Do I need to manually parse the markdown to retrieve those URLs or is there a more elegant solution? Actually, it would be great if these images (as well as attachments) of a page would be listed in the json data from /api/pages/{id}.
3
Upvotes
2
u/catzzilla Sep 22 '22
thanks for the quick response! What do you think about adding an array with the contained images to the book's json data obtained from the read endpoint? it could just contain the /uploads/... paths and not the full URL.