Attachments not uploading #270

Closed
opened 2026-02-04 18:10:34 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @mcblum on GitHub (Feb 15, 2017).

For Bug Reports

  • BookStack Version: Latest (as of Feb 15, 2017)
  • PHP Version: 7
  • MySQL Version: 5.6? Whatever was installed with the Ubuntu script.
Expected Behavior

I would be able to upload an attachment.

Actual Behavior

I'm trying to upload an attachment which is, in this case, a pdf. I get a 422 unprocessable back from the API with the following response:
{"validation":{"file":["validation.uploaded"]}}

Originally created by @mcblum on GitHub (Feb 15, 2017). ### For Bug Reports * BookStack Version: Latest (as of Feb 15, 2017) * PHP Version: 7 * MySQL Version: 5.6? Whatever was installed with the Ubuntu script. ##### Expected Behavior I would be able to upload an attachment. ##### Actual Behavior I'm trying to upload an attachment which is, in this case, a pdf. I get a `422 unprocessable` back from the API with the following response: ```{"validation":{"file":["validation.uploaded"]}}```
OVERLORD added the 🐕 Support label 2026-02-04 18:10:34 +03:00
Author
Owner

@mcblum commented on GitHub (Feb 15, 2017):

Thank you for making Bookstack! It's really awesome.

@mcblum commented on GitHub (Feb 15, 2017): Thank you for making Bookstack! It's really awesome.
Author
Owner

@mayrmartin commented on GitHub (Feb 20, 2017):

Hey, are the folder permissions set the right way?⁠⁠⁠⁠

@mayrmartin commented on GitHub (Feb 20, 2017): Hey, are the folder permissions set the right way?⁠⁠⁠⁠
Author
Owner

@ssddanbrown commented on GitHub (Feb 23, 2017):

Hi @mcblum, Sorry you're seeing this issue and sorry for my late reply.
As mayrmartin has mentioned can you check the permissions of the storage/uploads folder (And all folders inside). Also, Could you confirm where you are seeing that validation message as that's not one I recognise at all.

@ssddanbrown commented on GitHub (Feb 23, 2017): Hi @mcblum, Sorry you're seeing this issue and sorry for my late reply. As mayrmartin has mentioned can you check the permissions of the `storage/uploads` folder (And all folders inside). Also, Could you confirm where you are seeing that validation message as that's not one I recognise at all.
Author
Owner

@christophert commented on GitHub (May 4, 2017):

I would check your server's upload limit. PHP has a default upload size limit of 2MB and if you're using NGINX it sets a default limit of 1MB.

@christophert commented on GitHub (May 4, 2017): I would check your server's upload limit. PHP has a default upload size limit of 2MB and if you're using NGINX it sets a default limit of 1MB.
Author
Owner

@ssddanbrown commented on GitHub (Sep 23, 2017):

Closing due to duration since last response. If you still face issues please open a new issue or feel free to continue to comment on this one.

@ssddanbrown commented on GitHub (Sep 23, 2017): Closing due to duration since last response. If you still face issues please open a new issue or feel free to continue to comment on this one.
Author
Owner

@crainsaw commented on GitHub (Jul 18, 2019):

As @christophert pointed out that is caused by the upload size limit. In my wamp configuration it was enough to change two values in the php.ini file:

; Maximum allowed size for uploaded files.
upload_max_filesize = 10M

; Must be greater than or equal to upload_max_filesize
post_max_size = 10M
@crainsaw commented on GitHub (Jul 18, 2019): As @christophert pointed out that is caused by the upload size limit. In my wamp configuration it was enough to change two values in the php.ini file: ``` ; Maximum allowed size for uploaded files. upload_max_filesize = 10M ; Must be greater than or equal to upload_max_filesize post_max_size = 10M ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#270