No selectable images after upload #1410

Closed
opened 2026-02-05 00:49:11 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @irreleph4nt on GitHub (Oct 14, 2019).

Describe the bug
When I am editing a page and upload a picture, the GUI tells me the upload succeeded and I can see my file under bookstack/public/uploads/images/gallery/2019-10/ but it does not show up in the GUI. The windows where you can select an image or search for one stays blank.

I am on a fresh CentOS 8 install of 0.27.4.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Go to any page, a new one or edit existing one
  2. Click on insert image
  3. Upload any image file
  4. Watch the "Select Image" dialog window

Expected behavior
An image that has been uploaded successfully should become available in the "Select Image" dialog so one can actually insert it into a page.

Screenshots
I am also seeing this in the Firefox console when the "Select Image" dialog opens and I subsequently upload a file.

Bildschirmfoto vom 2019-10-14 21-02-55

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): 0.27.4
  • PHP Version: 7.2.11
  • Hosting Method (Nginx/Apache/Docker): Nginx & Letsencrypt

Additional context
My env file contains only the bare minimum of app_key, app_url and database information. Creation of text-based pages works fine.

Originally created by @irreleph4nt on GitHub (Oct 14, 2019). **Describe the bug** When I am editing a page and upload a picture, the GUI tells me the upload succeeded and I can see my file under bookstack/public/uploads/images/gallery/2019-10/ but it does not show up in the GUI. The windows where you can select an image or search for one stays blank. I am on a fresh CentOS 8 install of 0.27.4. **Steps To Reproduce** Steps to reproduce the behavior: 1. Go to any page, a new one or edit existing one 2. Click on insert image 3. Upload any image file 4. Watch the "Select Image" dialog window **Expected behavior** An image that has been uploaded successfully should become available in the "Select Image" dialog so one can actually insert it into a page. **Screenshots** I am also seeing this in the Firefox console when the "Select Image" dialog opens and I subsequently upload a file. ![Bildschirmfoto vom 2019-10-14 21-02-55](https://user-images.githubusercontent.com/29428359/66776833-a4112380-eec7-11e9-9244-1fc68a9ea94f.png) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): 0.27.4 - PHP Version: 7.2.11 - Hosting Method (Nginx/Apache/Docker): Nginx & Letsencrypt **Additional context** My env file contains only the bare minimum of app_key, app_url and database information. Creation of text-based pages works fine.
OVERLORD added the 🐕 Support label 2026-02-05 00:49:11 +03:00
Author
Owner

@mvanwessem-hiveip commented on GitHub (Oct 15, 2019):

I have noticed the same error:

error #1

error #2

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): 0.27.4
  • PHP Version: 7.3.10 (alson on 7.3.9)
  • OS Version: CentOS Linux release 7.6.1810 (Core)
  • Hosting Method (Nginx/Apache/Docker): Nginx & Trustico wildcard SSL

Additional context:
STORAGE_TYPE=local
STORAGE_IMAGE_TYPE=local
STORAGE_ATTACHMENT_TYPE=local_secure

No Secure image upload is set in settings.

EDIT: Add: made sure PHP-GD is installed and have run composer install again. No change in described sympthom

@mvanwessem-hiveip commented on GitHub (Oct 15, 2019): I have noticed the same error: ![error #1](https://user-images.githubusercontent.com/54842854/66837256-9d7fbc00-ef5a-11e9-8922-c30954258ac4.png) ![error #2](https://user-images.githubusercontent.com/54842854/66837270-a1abd980-ef5a-11e9-8408-fe7dc6ae8ef9.png) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): 0.27.4 - PHP Version: 7.3.10 (alson on 7.3.9) - OS Version: CentOS Linux release 7.6.1810 (Core) - Hosting Method (Nginx/Apache/Docker): Nginx & Trustico wildcard SSL **Additional context:** STORAGE_TYPE=local STORAGE_IMAGE_TYPE=local STORAGE_ATTACHMENT_TYPE=local_secure No Secure image upload is set in settings. EDIT: Add: made sure PHP-GD is installed and have run composer install again. No change in described sympthom
Author
Owner

@irreleph4nt commented on GitHub (Nov 8, 2019):

@ssddanbrown
Any chance you can take a look at this? Meanwhile I'll roll back to v0.26 and test again.

@irreleph4nt commented on GitHub (Nov 8, 2019): @ssddanbrown Any chance you can take a look at this? Meanwhile I'll roll back to v0.26 and test again.
Author
Owner

@irreleph4nt commented on GitHub (Nov 26, 2019):

@ssddanbrown I can confirm that this issue does not exist in v0.26.4. I installed that version on CentOS 8 and adding images to pages works fine.

@irreleph4nt commented on GitHub (Nov 26, 2019): @ssddanbrown I can confirm that this issue does not exist in v0.26.4. I installed that version on CentOS 8 and adding images to pages works fine.
Author
Owner

@koesie10 commented on GitHub (Mar 7, 2020):

I encountered this issue as well. BookStack doesn't seem to recognize content-type: application/json; charset=utf-8 header as JSON, it only recognizes content-type: application/json. In my case I had the charset utf-8; directive in my Nginx config file. When I removed it, images started working again.

@koesie10 commented on GitHub (Mar 7, 2020): I encountered this issue as well. BookStack doesn't seem to recognize `content-type: application/json; charset=utf-8` header as JSON, it only recognizes `content-type: application/json`. In my case I had the `charset utf-8;` directive in my Nginx config file. When I removed it, images started working again.
Author
Owner

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

Sorry @irreleph4nt for not coming to this until now. Are you still having issues?

If so, please could you confirm what the first error in the console log shows? Or if there are any failed requests in the network tab in the devtools when uploading an image?

I'm thinking the errors shown could be misleading but a failed request causes a side-effect to throw the errors.

@ssddanbrown commented on GitHub (Apr 2, 2020): Sorry @irreleph4nt for not coming to this until now. Are you still having issues? If so, please could you confirm what the first error in the console log shows? Or if there are any failed requests in the network tab in the devtools when uploading an image? I'm thinking the errors shown could be misleading but a failed request causes a side-effect to throw the errors.
Author
Owner

@ssddanbrown commented on GitHub (Apr 18, 2021):

Since there's been no follow-up I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.

@ssddanbrown commented on GitHub (Apr 18, 2021): Since there's been no follow-up I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue, referencing this one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1410