Secure Image upload failed #1088

Closed
opened 2026-02-04 23:43:04 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @madsmka on GitHub (Mar 13, 2019).

Describe the bug
After changing the image storage to secure and moving all the images to storage/uploads/images we are now getting the following error when trying to upload an image:

image

And we are also seeing this on all our old images:
image

Steps To Reproduce
Steps to reproduce the behavior:

  1. Go to any page
  2. Click on 'Edit'
  3. Click 'Insert an image"
  4. Upload image

Configuration:

  • BookStack Version: BookStack v0.25.1
  • PHP Version: PHP 7.2.15-0ubuntu0.18.04.1
  • Hosting Method: Apache/2.4.29 (Ubuntu)

Additional context

.env storage config:
image

Permissions:
image

Originally created by @madsmka on GitHub (Mar 13, 2019). **Describe the bug** After changing the image storage to secure and moving all the images to storage/uploads/images we are now getting the following error when trying to upload an image: ![image](https://user-images.githubusercontent.com/47882801/54263105-523e9e80-4570-11e9-92ce-cf1869dfd5de.png) And we are also seeing this on all our old images: ![image](https://user-images.githubusercontent.com/47882801/54263446-21129e00-4571-11e9-8165-5b3feecfb159.png) **Steps To Reproduce** Steps to reproduce the behavior: 1. Go to any page 2. Click on 'Edit' 3. Click 'Insert an image" 4. Upload image **Configuration:** - BookStack Version: BookStack v0.25.1 - PHP Version: PHP 7.2.15-0ubuntu0.18.04.1 - Hosting Method: Apache/2.4.29 (Ubuntu) **Additional context** .env storage config: ![image](https://user-images.githubusercontent.com/47882801/54263577-7353bf00-4571-11e9-9f7f-5cc04adbb41d.png) Permissions: ![image](https://user-images.githubusercontent.com/47882801/54263710-c4fc4980-4571-11e9-8966-8377878bed7e.png)
OVERLORD added the 🐕 Support label 2026-02-04 23:43:04 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Mar 13, 2019):

Hi @madsmka,
Have you tried setting STORAGE_TYPE=local_secure in your .env file?

The s3 option you have set is for use with Amazon's cloud storage.

@ssddanbrown commented on GitHub (Mar 13, 2019): Hi @madsmka, Have you tried setting `STORAGE_TYPE=local_secure` in your `.env` file? The `s3` option you have set is for use with Amazon's cloud storage.
Author
Owner

@madsmka commented on GitHub (Mar 13, 2019):

Hi

I changed the Storage type to local_secure as you said and restarted the server. Nothing changed at first. I waited 10 minutes and tried restarting the apache service and then everything worked.

The reason i changed it to s3 at first, was because i had the same problem with local_secure the last time I tried. But I didn't wait the last time.. :)

Thanks for the fast respons.

@madsmka commented on GitHub (Mar 13, 2019): Hi I changed the Storage type to local_secure as you said and restarted the server. Nothing changed at first. I waited 10 minutes and tried restarting the apache service and then everything worked. The reason i changed it to s3 at first, was because i had the same problem with local_secure the last time I tried. But I didn't wait the last time.. :) Thanks for the fast respons.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1088