Cannot upload Images #1882

Closed
opened 2026-02-05 02:07:21 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @spacesven on GitHub (Oct 2, 2020).

Describe the bug
If you try to upload an Image in any way (Profile Picture, Book Cover or Page-Image) it gets the message "an unknown error occurred"

Steps To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Edit Profile'
  2. Click on 'Upload Image'
  3. Select Image
  4. Click on 'Save'
    ^5. Error Occurrs

Expected behavior
Image should be saved/inserted without error

Screenshots
https://i.imgur.com/EmEr6km.png
https://i.imgur.com/GFEjCBz.png

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.30.2
  • PHP Version: 7.2.19
  • Hosting Method (Nginx/Apache/Docker): IIS 10 (Windows Server 2019)
  • Composer 1.9.2

Additional context
Laravel Log-File:
laravel.log

Originally created by @spacesven on GitHub (Oct 2, 2020). **Describe the bug** If you try to upload an Image in any way (Profile Picture, Book Cover or Page-Image) it gets the message "an unknown error occurred" **Steps To Reproduce** Steps to reproduce the behavior: 1. Go to 'Edit Profile' 2. Click on 'Upload Image' 3. Select Image 4. Click on 'Save' ^5. Error Occurrs **Expected behavior** Image should be saved/inserted without error **Screenshots** [https://i.imgur.com/EmEr6km.png](https://i.imgur.com/EmEr6km.png) [https://i.imgur.com/GFEjCBz.png](https://i.imgur.com/GFEjCBz.png) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v0.30.2 - PHP Version: 7.2.19 - Hosting Method (Nginx/Apache/Docker): IIS 10 (Windows Server 2019) - Composer 1.9.2 **Additional context** Laravel Log-File: [laravel.log](https://github.com/BookStackApp/BookStack/files/5317034/laravel.log)
Author
Owner

@ssddanbrown commented on GitHub (Oct 2, 2020):

Hi @spacesven,
Sorry you're seeing issues.

So the error being logged is file_get_contents(): Filename cannot be empty.
From what I've seen, On IIS this is generally due to folder permissions, potentially for the system Temp folder.

It's worth reading through #137 as I believe that details the same issue. In particular the info in this comment may help: https://github.com/BookStackApp/BookStack/issues/137#issuecomment-306751862

I don't run IIS myself though so can't be sure.

@ssddanbrown commented on GitHub (Oct 2, 2020): Hi @spacesven, Sorry you're seeing issues. So the error being logged is `file_get_contents(): Filename cannot be empty`. From what I've seen, On IIS this is generally due to folder permissions, potentially for the system Temp folder. It's worth reading through #137 as I believe that details the same issue. In particular the info in this comment may help: https://github.com/BookStackApp/BookStack/issues/137#issuecomment-306751862 I don't run IIS myself though so can't be sure.
Author
Owner

@SayHeyD commented on GitHub (Oct 5, 2020):

Hey I'm a co-worker of @spacesven. Thanks to your response we were able to resolve the Problem, we thought we changed the PHP-Temp upload directory to a Path where our custom User had access to, but it turns out that this configuration didn't get saved or applied properly. The Issue you linked provided the complete solution of our Problem. Thanks.

@SayHeyD commented on GitHub (Oct 5, 2020): Hey I'm a co-worker of @spacesven. Thanks to your response we were able to resolve the Problem, we thought we changed the PHP-Temp upload directory to a Path where our custom User had access to, but it turns out that this configuration didn't get saved or applied properly. The Issue you linked provided the complete solution of our Problem. Thanks.
Author
Owner

@ssddanbrown commented on GitHub (Oct 6, 2020):

@SayHeyD Awesome, Thanks for confirming that worked, glad to hear things are working now. Will therefore close this off.

@ssddanbrown commented on GitHub (Oct 6, 2020): @SayHeyD Awesome, Thanks for confirming that worked, glad to hear things are working now. Will therefore close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1882