Skip to content

Bookstack cannot handle 'large' files #5533

Open
@kobaz

Description

@kobaz

Describe the Bug

Update related settings to allow large files in apache, php, bookstack
Upload large file
Upload fails

Steps to Reproduce

  1. Update related settings to allow large files in apache, php, bookstack
  2. bookstack
    FILE_UPLOAD_SIZE_LIMIT=4096
  3. apache
    LimitRequestBody 4294967296
  4. php
    memory_limit = 4096M
    post_max_size = 4096M
    upload_max_filesize = 4096M

phpinfo() validates the above settings are loaded.

  1. Upload large file (This one is Content-Length 975151309)

  2. Observe error:
    attachments/upload?uploaded_to=377
    422 (Unprocessable Content)

I'm seeing that files that go over the apache max request size will result in
attachments/upload?uploaded_to=377
net::ERR_CONNECTION_RESET 413 (Request Entity Too Large)

But If you're within the apache max request size, then you get the 422 error. Is bookstack throwing this? It's hard to tell, since bookstack doesn't seem to write any log files.

Expected Behaviour

Expected upload to be successful.

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

v25.02

Updates Since Originally posting the bug:
I made a quick test.php that accepted any type of upload.
I uploaded the exact same file with 'Content-Length 975151309' and the test upload returned 200 OK

It does seem to point to bookstack doing the rejection of: 422 (Unprocessable Content)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions