BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Can't upload images

Open mehrdad-shokri opened this issue 8 years ago • 7 comments

  • 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

mehrdad-shokri avatar Apr 20 '18 06:04 mehrdad-shokri

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 avatar Apr 21 '18 11:04 watschi

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 avatar Apr 21 '18 18:04 mehrdad-shokri

Thanks @watschi for your help.

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

ssddanbrown avatar Apr 22 '18 10:04 ssddanbrown

@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 avatar Apr 23 '18 07:04 mehrdad-shokri

@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 avatar Oct 07 '18 21:10 mehrdad-shokri

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:

saikrishna1488 avatar Aug 08 '24 06:08 saikrishna1488

Same here, not working with s3 when running on docker

jagyas avatar Sep 05 '24 13:09 jagyas