New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
danielbachhuber opened this Issue Apr 12, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@danielbachhuber
Member

danielbachhuber commented Apr 12, 2018

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

@danielbachhuber danielbachhuber added this to the Merge Proposal: Media milestone Apr 12, 2018

@jorgefilipecosta

This comment has been minimized.

Member

jorgefilipecosta commented Apr 16, 2018

I think this PR #4203 will handle the issue.

@danielbachhuber

This comment has been minimized.

Member

danielbachhuber commented Apr 16, 2018

@jorgefilipecosta The PR also needs to respect blog_upload_space on multisite. It doesn't appear to include that.

@jorgefilipecosta jorgefilipecosta self-assigned this May 23, 2018

@danielbachhuber danielbachhuber self-assigned this Jun 1, 2018

@jorgefilipecosta jorgefilipecosta removed their assignment Jun 1, 2018

@danielbachhuber danielbachhuber changed the title from Drag and drop uploading doesn't respect multisite max upload size to Drag and drop uploading should respect multisite max upload size Jun 6, 2018

@danielbachhuber

This comment has been minimized.

Member

danielbachhuber commented Jul 10, 2018

I've updated the Core Trac ticket with a patch I like: https://core.trac.wordpress.org/ticket/43751#comment:3

We can close this issue when a patch for the Trac ticket lands in Core. At this point, I don't think it's worth backporting the change to Gutenberg.

@danielbachhuber

This comment has been minimized.

Member

danielbachhuber commented Jul 17, 2018

🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment