Skip to content

Issue with uploading files in Django >= 1.10 #18

@ekini

Description

@ekini

There is Django setting DATA_UPLOAD_MAX_MEMORY_SIZE.

The maximum size in bytes that a request body may be before a SuspiciousOperation (RequestDataTooBig) is raised. The check is done when accessing request.body or request.POST and is calculated against the total request size excluding any file upload data.

So that we never need to modify this setting to upload files.

But Wagtail Enforcer somehow mangles requests, so that the files sizes are included into the calculation. So by default, it limits the size by 2.5Mb.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions