Possibility to update the link of the images containing the name of the remote storage. #2161

Closed
opened 2026-02-05 03:09:48 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @vmarlier on GitHub (Mar 18, 2021).

Describe the feature you'd like
The idea would be to be able to automatically modify the link of the images stored in a remote storage (S3 buckets or others).
The link is like http://<endpoint-and-bucket-name>/uploads...
So maybe run a configuration check, and if the bucket name changed, automatically change the name in the images link.

Describe the benefits this feature would bring to BookStack users
It would be handy when restoring a backup with a different infrastructure or a different providers..
I'm currently facing this issue and I need to go on each page and update the link of each images..

image image

Edit: When I update the link like in the image above, the image don't show up. I have to click on the button "add an image" and select the good image. It's quite counter productive.
image

If you need more details let me know.

Originally created by @vmarlier on GitHub (Mar 18, 2021). **Describe the feature you'd like** The idea would be to be able to automatically modify the link of the images stored in a remote storage (S3 buckets or others). The link is like ```http://<endpoint-and-bucket-name>/uploads...``` So maybe run a configuration check, and if the bucket name changed, automatically change the name in the images link. **Describe the benefits this feature would bring to BookStack users** It would be handy when restoring a backup with a different infrastructure or a different providers.. I'm currently facing this issue and I need to go on each page and update the link of each images.. <img width="978" alt="image" src="https://user-images.githubusercontent.com/32210943/111646048-9ae55e00-8801-11eb-9b02-b813aa35d96d.png"> <img width="460" alt="image" src="https://user-images.githubusercontent.com/32210943/111646115-a9337a00-8801-11eb-89a6-60b85eb16bf6.png"> Edit: When I update the link like in the image above, the image don't show up. I have to click on the button "add an image" and select the good image. It's quite counter productive. <img width="929" alt="image" src="https://user-images.githubusercontent.com/32210943/111689993-f8db6b00-882c-11eb-97a3-bceda723a203.png"> If you need more details let me know.
Author
Owner

@ssddanbrown commented on GitHub (Mar 19, 2021):

Hi @vmarlier,

You should be able to make use of the bookstack:update-url command as detailed under the "Update System URL" header here: https://www.bookstackapp.com/docs/admin/commands/#update-system-url

This essentially runs a find & replace for the given URLs across the relevant tables within the database.

@ssddanbrown commented on GitHub (Mar 19, 2021): Hi @vmarlier, You should be able to make use of the `bookstack:update-url` command as detailed under the "Update System URL" header here: https://www.bookstackapp.com/docs/admin/commands/#update-system-url This essentially runs a find & replace for the given URLs across the relevant tables within the database.
Author
Owner

@vmarlier commented on GitHub (Mar 19, 2021):

Okay thank you, I'll try it on my dev environment (I did it manually yesterday ^^).

I'm running bookstack in a k8s so I don't really like to exec command inside a container but if that works that would be much easier in case of a new bucket change.

Thanks I close the issue then.

@vmarlier commented on GitHub (Mar 19, 2021): Okay thank you, I'll try it on my dev environment (I did it manually yesterday ^^). I'm running bookstack in a k8s so I don't really like to exec command inside a container but if that works that would be much easier in case of a new bucket change. Thanks I close the issue then.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2161