Skip to content
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
Closed
Assignees
Labels
[Feature] Media Anything that impacts the experience of managing media [Type] Bug An existing feature does not function as intended
Milestone

Comments

@danielbachhuber
Copy link
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 [Type] Bug An existing feature does not function as intended [Feature] Media Anything that impacts the experience of managing media labels Apr 12, 2018
@danielbachhuber danielbachhuber added this to the Merge Proposal: Media milestone Apr 12, 2018
@jorgefilipecosta
Copy link
Member

I think this PR #4203 will handle the issue.

@danielbachhuber
Copy link
Member Author

@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 Drag and drop uploading doesn't respect multisite max upload size Drag and drop uploading should respect multisite max upload size Jun 6, 2018
@gziolo gziolo added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Jun 11, 2018
@danielbachhuber danielbachhuber removed the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Jul 10, 2018
@danielbachhuber
Copy link
Member Author

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
Copy link
Member Author

🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Media Anything that impacts the experience of managing media [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants