I can't upload Images or Files #3753

Closed
opened 2026-02-05 07:20:08 +03:00 by OVERLORD · 12 comments
Owner

Originally created by @n3yus on GitHub (Apr 20, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Hey, I have the problem, that i can't uploade any images or files. I also tried this command:
chown www-data:www-data -R bootstrap/cache public/uploads storage && chmod -R 755 bootstrap/cache public/uploads storage, but i didn't do anything. I got everytime the error code: 0.

image

Exact BookStack Version

v23.02.3

Log Content

No response

PHP Version

No response

Hosting Environment

Ubuntu v22.04.01-live-server

Originally created by @n3yus on GitHub (Apr 20, 2023). ### Attempted Debugging - [x] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Hey, I have the problem, that i can't uploade any images or files. I also tried this command: `chown www-data:www-data -R bootstrap/cache public/uploads storage && chmod -R 755 bootstrap/cache public/uploads storage`, but i didn't do anything. I got everytime the error code: 0. ![image](https://user-images.githubusercontent.com/81981815/233430645-d37ec5bf-7ca8-4d34-8986-a8e1bc6c884f.png) ### Exact BookStack Version v23.02.3 ### Log Content _No response_ ### PHP Version _No response_ ### Hosting Environment Ubuntu v22.04.01-live-server
OVERLORD added the 🐕 Support label 2026-02-05 07:20:08 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Apr 20, 2023):

Hi @neyusyt,
Can you confirm exactly how you installed BookStack, and if there are any other parts in play (Proxies/Cloudflare/Other HTTP Layers).

@ssddanbrown commented on GitHub (Apr 20, 2023): Hi @neyusyt, Can you confirm exactly how you installed BookStack, and if there are any other parts in play (Proxies/Cloudflare/Other HTTP Layers).
Author
Owner

@NEYUS-GITHUB commented on GitHub (Apr 21, 2023):

@ssddanbrown i installed Bookstack with the official Start.sh in the Homepage. The Domain is hosted by cloudflare and i configuraded as a tunnel over a Ubuntu vm.

@NEYUS-GITHUB commented on GitHub (Apr 21, 2023): @ssddanbrown i installed Bookstack with the official Start.sh in the Homepage. The Domain is hosted by cloudflare and i configuraded as a tunnel over a Ubuntu vm.
Author
Owner

@ssddanbrown commented on GitHub (Apr 21, 2023):

@neyusyt We have no official start.sh on our homepage?

Either way, it's not clear where the error is coming from.
Assuming you've used our Ubuntu 22.04 install script, can you watch the /var/log/apache2/access.log file and confirm if you see lines added exactly when the error occurs.
If not, it's likely something in front of the BookStack machine webserver blocking the request. It's worth checking logs for the Cloudflare proxy if they provide it.

@ssddanbrown commented on GitHub (Apr 21, 2023): @neyusyt We have no official `start.sh` on our homepage? Either way, it's not clear where the error is coming from. Assuming you've used our Ubuntu 22.04 install script, can you watch the `/var/log/apache2/access.log` file and confirm if you see lines added exactly when the error occurs. If not, it's likely something in front of the BookStack machine webserver blocking the request. It's worth checking logs for the Cloudflare proxy if they provide it.
Author
Owner

@n3yus commented on GitHub (Apr 21, 2023):

I can't open that file: /var/log/apache2/access.log, because this location doesn't exist. I can't the logs from Cloudflare Proxie. I searched a lot, but i cant find a log file.

@n3yus commented on GitHub (Apr 21, 2023): I can't open that file: `/var/log/apache2/access.log`, because this location doesn't exist. I can't the logs from Cloudflare Proxie. I searched a lot, but i cant find a log file.
Author
Owner

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

I can't open that file: /var/log/apache2/access.log

How exactly did you install BookStack? You may need to look into these folders with superuser/root privileges.

@ssddanbrown commented on GitHub (Apr 22, 2023): > I can't open that file: /var/log/apache2/access.log How exactly did you install BookStack? You may need to look into these folders with superuser/root privileges.
Author
Owner

@n3yus commented on GitHub (Apr 27, 2023):

@ssddanbrown I installed with this script:

Download the script
wget https://raw.githubusercontent.com/BookStackApp/devops/main/scripts/installation-ubuntu-22.04.sh

Make it executable
chmod a+x installation-ubuntu-22.04.sh

Run the script with admin permissions
sudo ./installation-ubuntu-22.04.sh

edit .env file
nano /var/www/bookstack/.env

in the log file (/var/log/apache2/access.log) isn't anything suspects.

@n3yus commented on GitHub (Apr 27, 2023): @ssddanbrown I installed with this script: ``` Download the script wget https://raw.githubusercontent.com/BookStackApp/devops/main/scripts/installation-ubuntu-22.04.sh Make it executable chmod a+x installation-ubuntu-22.04.sh Run the script with admin permissions sudo ./installation-ubuntu-22.04.sh edit .env file nano /var/www/bookstack/.env ``` in the log file (`/var/log/apache2/access.log`) isn't anything suspects.
Author
Owner

@ssddanbrown commented on GitHub (Apr 27, 2023):

in the log file (/var/log/apache2/access.log) isn't anything suspects.

But do you see any lines logged at exactly the same time you reproduce the error?

@ssddanbrown commented on GitHub (Apr 27, 2023): > in the log file (/var/log/apache2/access.log) isn't anything suspects. But do you see any lines logged at exactly the same time you reproduce the error?
Author
Owner

@n3yus commented on GitHub (Apr 27, 2023):

@ssddanbrown No it doesn't logged anything

@n3yus commented on GitHub (Apr 27, 2023): @ssddanbrown No it doesn't logged anything
Author
Owner

@ssddanbrown commented on GitHub (Apr 28, 2023):

@neyusyt Okay, that often means that it's an issue before the request is hitting the webserver.
Could be an issue around that cloudflare proxy.

Other things to try:

  • If possible, try without having the cloudflare proxy involved to rule that out.
  • Try a much smaller file image file size to see if that works.
  • Look at the request and response in the network tab of the browser developer tools to see if there's more information provided there (Request would likely show as a red line within the table, after reproducing the error).
@ssddanbrown commented on GitHub (Apr 28, 2023): @neyusyt Okay, that often means that it's an issue before the request is hitting the webserver. Could be an issue around that cloudflare proxy. Other things to try: - If possible, try without having the cloudflare proxy involved to rule that out. - Try a much smaller file image file size to see if that works. - Look at the request and response in the network tab of the browser developer tools to see if there's more information provided there (Request would likely show as a red line within the table, after reproducing the error).
Author
Owner

@ssddanbrown commented on GitHub (May 14, 2023):

Since there's been no further follow up I'll close this off.

@ssddanbrown commented on GitHub (May 14, 2023): Since there's been no further follow up I'll close this off.
Author
Owner

@alexanderisora commented on GitHub (May 20, 2024):

@ssddanbrown hello Dan. I was having the same problem.

I was able to fix the issue by deactivating Cloudflare proxy. I still want to use Cloudflare for 2 reasons:

  1. SSL certificate (the Bookstack installation guide does not provide information about installing SSL)
  2. Cloudflare gives many features for my website for free and it is a common practice to use it.

What can I do to enable Cloudflare? Thanks!

@alexanderisora commented on GitHub (May 20, 2024): @ssddanbrown hello Dan. I was having the same problem. I was able to fix the issue by deactivating Cloudflare proxy. I still want to use Cloudflare for 2 reasons: 1) SSL certificate (the Bookstack installation guide does not provide information about installing SSL) 2) Cloudflare gives many features for my website for free and it is a common practice to use it. What can I do to enable Cloudflare? Thanks!
Author
Owner

@ssddanbrown commented on GitHub (May 20, 2024):

@alexanderisora Please open a new support issue specific to your scenario & environment.
Information here may be now irrelevant or outdated.

@ssddanbrown commented on GitHub (May 20, 2024): @alexanderisora Please open a new support issue specific to your scenario & environment. Information here may be now irrelevant or outdated.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3753