Unable to Upload Images #2345

Closed
opened 2026-02-05 03:44:57 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @eferreira2 on GitHub (Aug 4, 2021).

Environment:
Ubuntu 20.04.02 LTS
BookStack v0.31.7

Starting today everyone now gets "an error occurred uploading the image" when uploading or copy/pasting files. Nothing has changed in our environment. I have app debugging turned on and no errors are being captured in laravel.log. I have verified file permissions in /var/www/bookstack/storage/uploads/files and even when setting everything in there to 777 I still can't upload new images.

{data: "File path /uploads/images/gallery/2021-08/UNwX7r3C…uploaded to. Ensure it is writable to the server.", headers: Headers, redirected: false, status: 500, statusText: "Internal Server Error", …}
data: "File path /uploads/images/gallery/2021-08/UNwX7r3C4qszffvS-image-1628089266480.png could not be uploaded to. Ensure it is writable to the server."
headers: Headers {}
original: Response {type: "basic", url: "https://bookstackurl.com/images/gallery", redirected: false, status: 500, ok: false, …}
redirected: false
status: 500
statusText: "Internal Server Error"
url: "https://bookstackurl.com/images/gallery"

image

Originally created by @eferreira2 on GitHub (Aug 4, 2021). Environment: Ubuntu 20.04.02 LTS BookStack v0.31.7 Starting today everyone now gets "an error occurred uploading the image" when uploading or copy/pasting files. Nothing has changed in our environment. I have app debugging turned on and no errors are being captured in laravel.log. I have verified file permissions in /var/www/bookstack/storage/uploads/files and even when setting everything in there to 777 I still can't upload new images. {data: "File path /uploads/images/gallery/2021-08/UNwX7r3C…uploaded to. Ensure it is writable to the server.", headers: Headers, redirected: false, status: 500, statusText: "Internal Server Error", …} data: "File path /uploads/images/gallery/2021-08/UNwX7r3C4qszffvS-image-1628089266480.png could not be uploaded to. Ensure it is writable to the server." headers: Headers {} original: Response {type: "basic", url: "https://bookstackurl.com/images/gallery", redirected: false, status: 500, ok: false, …} redirected: false status: 500 statusText: "Internal Server Error" url: "https://bookstackurl.com/images/gallery" ![image](https://user-images.githubusercontent.com/60720273/128204961-259375dc-0719-4966-8764-c012490359c5.png)
Author
Owner

@eferreira2 commented on GitHub (Aug 4, 2021):

Disregard. Dup of https://github.com/BookStackApp/BookStack/issues/809
Running this command from the root bookstack directory fixed it:
chown www-data:www-data -R bootstrap/cache public/uploads storage && chmod -R 755 bootstrap/cache public/uploads storage

@eferreira2 commented on GitHub (Aug 4, 2021): Disregard. Dup of https://github.com/BookStackApp/BookStack/issues/809 Running this command from the root bookstack directory fixed it: chown www-data:www-data -R bootstrap/cache public/uploads storage && chmod -R 755 bootstrap/cache public/uploads storage
Author
Owner

@saikrishna1488 commented on GitHub (Aug 8, 2024):

@eferreira2 i tried the above approach but it does not solved my problem and another thing is i launched containers using the compose file that they provided for testing whether these file uploads are working and i edited the .env file and added below lines to store the images and files in s3
`STORAGE_TYPE=s3

STORAGE_S3_KEY=your-s3-key

STORAGE_S3_SECRET=your-s3-secret

STORAGE_S3_BUCKET=s3-bucket-name

STORAGE_S3_REGION=s3-bucket-region`

and facing the error that you specified but local stoarge working fine for me i am facing the issue with s3

@saikrishna1488 commented on GitHub (Aug 8, 2024): @eferreira2 i tried the above approach but it does not solved my problem and another thing is i launched containers using the compose file that they provided for testing whether these file uploads are working and i edited the .env file and added below lines to store the images and files in s3 `STORAGE_TYPE=s3 STORAGE_S3_KEY=your-s3-key STORAGE_S3_SECRET=your-s3-secret STORAGE_S3_BUCKET=s3-bucket-name STORAGE_S3_REGION=s3-bucket-region` and facing the error that you specified but local stoarge working fine for me i am facing the issue with s3
Author
Owner

@saikrishna1488 commented on GitHub (Aug 8, 2024):

Not working i am facing same issue in server as well as in container with s3. And another thing is i am getting the file upload error but files are uploaded to s3 🙆‍♀️ 🙆‍♀️ 🙆‍♀️

@saikrishna1488 commented on GitHub (Aug 8, 2024): Not working i am facing same issue in server as well as in container with s3. And another thing is i am getting the file upload error but files are uploaded to s3 🙆‍♀️ 🙆‍♀️ 🙆‍♀️
Author
Owner

@sakonn commented on GitHub (Nov 30, 2024):

The same issue does happed to me. Also using the bookstack with the S3 bucket for images. The bookstack throws the error although the image is uploaded to s3 bucket.

@sakonn commented on GitHub (Nov 30, 2024): The same issue does happed to me. Also using the bookstack with the S3 bucket for images. The bookstack throws the error although the image is uploaded to s3 bucket.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2345