[Bug Report]: CoverImage Upload in create book doesn't update if the imagename is same #2547

Closed
opened 2026-02-05 04:28:47 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @0xSh1v4 on GitHub (Dec 29, 2021).

Describe the Bug

The image upload functionality while creating a book doesn't upload if the imagename is same which has been updated before. It doesn't reload the the image and update it. Still the application loads the old image with the same name instead of updating the image.

Steps to Reproduce

  1. Create a book and upload a cover image for that book. (for ex: the cover image name is 1.png which is a book image)
  2. Now in your pc/laptop rename the another image as 1.png which is a car image
  3. Now go to the book - edit and select this 1.png (car image) and upload
  4. Now the image should be updated but in our case it is still the book image not the car image.

Expected Behaviour

If the file name of the image is already been used in the bookstack then you can't upload the image with the same filename. Neither it replaces the image nor it updates the image.

Screenshots or Additional Context

No response

Exact BookStack Version

v21.10.3

PHP Version

No response

Hosting Environment

Debian linux with nginx-reverse proxy

Originally created by @0xSh1v4 on GitHub (Dec 29, 2021). ### Describe the Bug The image upload functionality while creating a book doesn't upload if the imagename is same which has been updated before. It doesn't reload the the image and update it. Still the application loads the old image with the same name instead of updating the image. ### Steps to Reproduce 1. Create a book and upload a cover image for that book. (for ex: the cover image name is 1.png which is a book image) 2. Now in your pc/laptop rename the another image as 1.png which is a car image 3. Now go to the book - edit and select this 1.png (car image) and upload 4. Now the image should be updated but in our case it is still the book image not the car image. ### Expected Behaviour If the file name of the image is already been used in the bookstack then you can't upload the image with the same filename. Neither it replaces the image nor it updates the image. ### Screenshots or Additional Context _No response_ ### Exact BookStack Version v21.10.3 ### PHP Version _No response_ ### Hosting Environment Debian linux with nginx-reverse proxy
OVERLORD added the 🐛 Bug label 2026-02-05 04:28:47 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 1, 2022):

Hi @0xSh1v4,
I've just tested this and I could change book cover images, to another of the same name, without issue.
The new image will have the same path as the old, which means that any browser-side caching (Possibly inferred by server rules) may cause the old image to show until caches are clear.

If this is due to server caching rules, you could enable the "Higher Security Image Uploads" setting which will cause uploaded image paths to likely be unique, no matter the original file name.

@ssddanbrown commented on GitHub (Jan 1, 2022): Hi @0xSh1v4, I've just tested this and I could change book cover images, to another of the same name, without issue. The new image will have the same path as the old, which means that any browser-side caching (Possibly inferred by server rules) may cause the old image to show until caches are clear. If this is due to server caching rules, you could enable the "Higher Security Image Uploads" setting which will cause uploaded image paths to likely be unique, no matter the original file name.
Author
Owner

@ssddanbrown commented on GitHub (Jan 6, 2022):

Since there's been no follow-up I'm going to close this. If the issue definitely remains, and you're certain it's not due to server configuration, feel free to still comment on this issue to be reopened.

@ssddanbrown commented on GitHub (Jan 6, 2022): Since there's been no follow-up I'm going to close this. If the issue definitely remains, and you're certain it's not due to server configuration, feel free to still comment on this issue to be reopened.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2547