Can't upload images #647

Closed
opened 2026-02-04 21:35:08 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @mehrdad-shokri on GitHub (Apr 20, 2018).

  • BookStack Version: v0.20.3
  • PHP Version: 7.2
  • MySQL Version: 5.7
Expected Behavior

Upload images in drag and drop

Current Behavior

Trying to upload an image results with:
File path /uploads/images/user/2018-04-Apr/Screenshot-from-2018-04-08-02-52-09.png could not be uploaded to. Ensure it is writable to the server. with error 500

Steps to Reproduce

Drag and drop an image to upload

Originally created by @mehrdad-shokri on GitHub (Apr 20, 2018). * BookStack Version: v0.20.3 * PHP Version: 7.2 * MySQL Version: 5.7 ##### Expected Behavior Upload images in drag and drop ##### Current Behavior Trying to upload an image results with: File path /uploads/images/user/2018-04-Apr/Screenshot-from-2018-04-08-02-52-09.png could not be uploaded to. Ensure it is writable to the server. with error 500 ##### Steps to Reproduce Drag and drop an image to upload
OVERLORD added the 🐕 Support label 2026-02-04 21:35:08 +03:00
Author
Owner

@watschi commented on GitHub (Apr 21, 2018):

Is your uploads directory writable by the webserver?

You need to chown www-data:www-data -R bootstrap/cache public/uploads storage && chmod -R 755 bootstrap/cache public/uploads storage in your bookstack directory after installation for uploads to work.

@watschi commented on GitHub (Apr 21, 2018): Is your `uploads` directory writable by the webserver? You need to `chown www-data:www-data -R bootstrap/cache public/uploads storage && chmod -R 755 bootstrap/cache public/uploads storage` in your bookstack directory after installation for uploads to work.
Author
Owner

@mehrdad-shokri commented on GitHub (Apr 21, 2018):

I solved it. I thought I should just change ownership of storage/uploads after turning secure image uploads on.
But it was going to upload on public/uploads anyway.

@mehrdad-shokri commented on GitHub (Apr 21, 2018): I solved it. I thought I should just change ownership of ``storage/uploads`` **after turning secure image uploads on**. But it was going to upload on ``public/uploads`` anyway.
Author
Owner

@ssddanbrown commented on GitHub (Apr 22, 2018):

Thanks @watschi for your help.

Glad to hear this issue is solved, Will go ahead and close this issue.

@ssddanbrown commented on GitHub (Apr 22, 2018): Thanks @watschi for your help. Glad to hear this issue is solved, Will go ahead and close this issue.
Author
Owner

@mehrdad-shokri commented on GitHub (Apr 23, 2018):

@ssddanbrown just a small question?
What does turning secure image upload on do?
Because it was uploading to public folder before and after turning this feature

@mehrdad-shokri commented on GitHub (Apr 23, 2018): @ssddanbrown just a small question? What does turning secure image upload on do? Because it was uploading to public folder before and after turning this feature
Author
Owner

@mehrdad-shokri commented on GitHub (Oct 8, 2018):

@watschi @ssddanbrown Hi.
Sorry for pinging again but I got another issue in uploading images. Now while observing my upload in network tab, I see it canceled. Without any error log on Nginx or php. I thought that should be upload size limit (because I can upload smaller sizes) but couldn't fix it.
My another guess is that Dropzone has a timeout, and since the file couldn't upload in that time it gets canceled.
Please note I can upload smaller size files. But this one is around 5M and no luck.
Thank you.

@mehrdad-shokri commented on GitHub (Oct 8, 2018): @watschi @ssddanbrown Hi. Sorry for pinging again but I got another issue in uploading images. Now while observing my upload in network tab, I see it canceled. Without any error log on Nginx or php. I thought that should be upload size limit (because I can upload smaller sizes) but couldn't fix it. My another guess is that Dropzone has a timeout, and since the file couldn't upload in that time it gets canceled. Please note I can upload smaller size files. But this one is around 5M and no luck. Thank you.
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 :ok_woman: :ok_woman: :ok_woman:
Author
Owner

@jagyas commented on GitHub (Sep 5, 2024):

Same here, not working with s3 when running on docker

@jagyas commented on GitHub (Sep 5, 2024): Same here, not working with s3 when running on docker
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#647