Uploading a file in a book is failing with a 422 http code #1220

Closed
opened 2026-02-05 00:17:32 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @nLenouvelProxiad on GitHub (Jun 12, 2019).

Cannot upload an attachment in a book to attach it into the book

Steps To Reproduce

  1. Go to Books
  2. Add a new book
  3. Select the attachment icon on the right tab
  4. Click on "upload a file" and select it
  5. In the network, you can see a 422 http code ( Unprocessable Entity) is returned with that message {"file":["validation.uploaded"]}
  6. At the same time as 5., in the console you can see :
POST https://rtfm.proxiad-axe-seine.com/attachments/upload 422 (Unprocessable Entity)
value @ app.js?version=v0.25.5:51
value @ app.js?version=v0.25.5:51
(anonymous) @ app.js?version=v0.25.5:51
(anonymous) @ app.js?version=v0.25.5:51
transformFile @ app.js?version=v0.25.5:51
o @ app.js?version=v0.25.5:51
value @ app.js?version=v0.25.5:51
value @ app.js?version=v0.25.5:51
value @ app.js?version=v0.25.5:51
value @ app.js?version=v0.25.5:51
value @ app.js?version=v0.25.5:51
(anonymous) @ app.js?version=v0.25.5:51
setTimeout (async)
value @ app.js?version=v0.25.5:51
(anonymous) @ app.js?version=v0.25.5:51
accept @ app.js?version=v0.25.5:51
value @ app.js?version=v0.25.5:51
value @ app.js?version=v0.25.5:51
(anonymous) @ app.js?version=v0.25.5:51

Expected behavior
I can upload and link a file to my book

Screenshots

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): 0.25.5
  • PHP Version: have to ask
  • Hosting Method (Nginx/Apache/Docker): have to ask
Originally created by @nLenouvelProxiad on GitHub (Jun 12, 2019). Cannot upload an attachment in a book to attach it into the book **Steps To Reproduce** 1. Go to Books 2. Add a new book 3. Select the attachment icon on the right tab 4. Click on "upload a file" and select it 5. In the network, you can see a 422 http code ( Unprocessable Entity) is returned with that message {"file":["validation.uploaded"]} 6. At the same time as 5., in the console you can see : ```` POST https://rtfm.proxiad-axe-seine.com/attachments/upload 422 (Unprocessable Entity) value @ app.js?version=v0.25.5:51 value @ app.js?version=v0.25.5:51 (anonymous) @ app.js?version=v0.25.5:51 (anonymous) @ app.js?version=v0.25.5:51 transformFile @ app.js?version=v0.25.5:51 o @ app.js?version=v0.25.5:51 value @ app.js?version=v0.25.5:51 value @ app.js?version=v0.25.5:51 value @ app.js?version=v0.25.5:51 value @ app.js?version=v0.25.5:51 value @ app.js?version=v0.25.5:51 (anonymous) @ app.js?version=v0.25.5:51 setTimeout (async) value @ app.js?version=v0.25.5:51 (anonymous) @ app.js?version=v0.25.5:51 accept @ app.js?version=v0.25.5:51 value @ app.js?version=v0.25.5:51 value @ app.js?version=v0.25.5:51 (anonymous) @ app.js?version=v0.25.5:51 ```` **Expected behavior** I can upload and link a file to my book **Screenshots** **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): 0.25.5 - PHP Version: have to ask - Hosting Method (Nginx/Apache/Docker): have to ask
OVERLORD added the 🐕 Support label 2026-02-05 00:17:32 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jun 15, 2019):

@nLenouvelProxiad I think this can often occur if the file fails to upload due to server upload size limits or due to file permissions.

I see your BookStack instance has since been updated to the latest version. Give it a try again and let me know if you still experience the same issue, without a helpful error message.

@ssddanbrown commented on GitHub (Jun 15, 2019): @nLenouvelProxiad I think this can often occur if the file fails to upload due to server upload size limits or due to file permissions. I see your BookStack instance has since been updated to the latest version. Give it a try again and let me know if you still experience the same issue, without a helpful error message.
Author
Owner

@ssddanbrown commented on GitHub (Sep 15, 2019):

Due to the lack of response from the original issue author I will close this.

If this issue remains please feel free to open a new issue, referencing this one.

@ssddanbrown commented on GitHub (Sep 15, 2019): Due to the lack of response from the original issue author I will close this. If this issue remains please feel free to 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#1220