JSON error when uploading attachment #1532

Closed
opened 2026-02-05 01:10:14 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @techauthoruk on GitHub (Feb 12, 2020).

Hi

I couldn't find another issue posted about this.

I have the current release of BookStack installed on my server. All works fine EXCEPT if I try to upload an attachment to a page. I can select the file without problem, click the upload button and it seems to upload, but then I get 'X' through the file and hovering over it gives an error message saying 'Invalid JSON response from server'

I don't know if this is a configuration problem on my server (running CentOS 8.1, Apache 2.x, PHP 7.2, MariaDB 10.2) or an issue with BookStack itself. Totally new to this, so don't know where to start looking, what log files might give me a clue, etc....could someone enlighten me?

Originally created by @techauthoruk on GitHub (Feb 12, 2020). Hi I couldn't find another issue posted about this. I have the current release of BookStack installed on my server. All works fine EXCEPT if I try to upload an attachment to a page. I can select the file without problem, click the upload button and it seems to upload, but then I get 'X' through the file and hovering over it gives an error message saying 'Invalid JSON response from server' I don't know if this is a configuration problem on my server (running CentOS 8.1, Apache 2.x, PHP 7.2, MariaDB 10.2) or an issue with BookStack itself. Totally new to this, so don't know where to start looking, what log files might give me a clue, etc....could someone enlighten me?
Author
Owner

@techauthoruk commented on GitHub (Feb 13, 2020):

Looked in the laravel.log file and there are no errors contained in there at all apart from one error a few days ago which was related to a permissions error for wkhtmltopdf, so I really don't know where to go next....

Here's a screen capture of the error:

image

Help!

@techauthoruk commented on GitHub (Feb 13, 2020): Looked in the laravel.log file and there are no errors contained in there at all apart from one error a few days ago which was related to a permissions error for wkhtmltopdf, so I really don't know where to go next.... Here's a screen capture of the error: ![image](https://user-images.githubusercontent.com/57015243/74445428-4806dd80-4e6e-11ea-9285-39b974acebae.png) Help!
Author
Owner

@techauthoruk commented on GitHub (Feb 14, 2020):

OK, found the problem - it was a server permissions issue, so closing this.

@techauthoruk commented on GitHub (Feb 14, 2020): OK, found the problem - it was a server permissions issue, so closing this.
Author
Owner

@berttejeda commented on GitHub (Mar 6, 2020):

Not sure if this is necessary, but I did so anyway: mkdir public/uploads/images
This, I'm sure is what fixed things: sudo chown -R www-data public

@berttejeda commented on GitHub (Mar 6, 2020): Not sure if this is necessary, but I did so anyway: `mkdir public/uploads/images` This, I'm sure is what fixed things: `sudo chown -R www-data public`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1532