Skip to content

Drag and drop uploading should respect multisite max upload size #6154

@danielbachhuber

Description

@danielbachhuber

Issue Overview

Drag and drop upload doesn't respect the max upload size option in WordPress multisite.

For reference, here's an example of the error in the media library:

image

In Gutenberg, I'm permitted to upload the same image without error.

Steps to Reproduce (for bugs)

In the network admin, configure "Max upload file size" to be a small-ish number:

image

Then, try uploading an image of a larger size into Gutenberg.

Expected Behavior

My expected error is to see some equivalent error in the Gutenberg editor. This validation should initially be handled client-side as Plupload, but also handled in the REST API (https://core.trac.wordpress.org/ticket/43751).

In resolving this issue, we'll need to also make sure Gutenberg respects the "Site upload space" option.

The two sitemeta options are fileupload_maxk and blog_upload_space:

image

Metadata

Metadata

Labels

[Feature] MediaAnything that impacts the experience of managing media[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions