[Bug Report]: local_secure option not working #2449

Closed
opened 2026-02-05 04:10:34 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @nixaura on GitHub (Oct 21, 2021).

Describe the Bug

I've changed the STORAGE_TYPE from local to local_secure in my .env file; however, images are still being uploaded to the public/uploads/images directory instead of /storage/uploads/images. I've cleared the cache with:

php artisan config:cache
php artisan config:clear
php artisan cache:clear

System Information:

BookStack v21.08.6
Ubuntu 20.04.3 LTS
Apache Server

Steps to Reproduce

  1. Change the STORAGE_TYPE variable in the .env to local_secure
  2. Upload an image and get the image URL path.
  3. Open an incognito browser and attempt to access the image URL path.

Expected Behaviour

Changing the STORAGE_TYPE to local_secure should put new images in the /storage/uploads/images and require authentication to view.

Screenshots or Additional Context

image

image

image

Exact BookStack Version

21.08.6

PHP Version

7.4.3

Hosting Environment

Ubuntu 20.04.3 LTS

Originally created by @nixaura on GitHub (Oct 21, 2021). ### Describe the Bug I've changed the STORAGE_TYPE from **local** to **local_secure** in my .env file; however, images are still being uploaded to the public/uploads/images directory instead of /storage/uploads/images. I've cleared the cache with: php artisan config:cache php artisan config:clear php artisan cache:clear System Information: BookStack v21.08.6 Ubuntu 20.04.3 LTS Apache Server ### Steps to Reproduce 1. Change the STORAGE_TYPE variable in the .env to **local_secure** 2. Upload an image and get the image URL path. 3. Open an incognito browser and attempt to access the image URL path. ### Expected Behaviour Changing the STORAGE_TYPE to local_secure should put new images in the /storage/uploads/images and require authentication to view. ### Screenshots or Additional Context ![image](https://user-images.githubusercontent.com/58672405/138305233-743f934a-f483-4e87-b65c-d5c6d3352f49.png) ![image](https://user-images.githubusercontent.com/58672405/138305297-947c4181-22c3-47f6-ad8a-f97aba32ed8c.png) ![image](https://user-images.githubusercontent.com/58672405/138305582-bfa6dbab-2b17-41ea-8632-4f10c9cd06e7.png) ### Exact BookStack Version 21.08.6 ### PHP Version 7.4.3 ### Hosting Environment Ubuntu 20.04.3 LTS
OVERLORD added the 🐛 Bug label 2026-02-05 04:10:34 +03:00
Author
Owner

@nixaura commented on GitHub (Oct 21, 2021):

I should've read the STORAGE_IMAGE_TYPE comment. I only used the default value that was provided. Changing that to local_secure resolved the issue.

image

Not a bug. Just a user error :)

@nixaura commented on GitHub (Oct 21, 2021): I should've read the STORAGE_IMAGE_TYPE comment. I only used the default value that was provided. Changing that to **local_secure** resolved the issue. ![image](https://user-images.githubusercontent.com/58672405/138306659-daf95136-3f85-4d19-b78d-3634fcaca812.png) Not a bug. Just a user error :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2449