WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#12853 closed defect (bug) (fixed)

uploading in Multisite over quota results in "Http Error"

Reported by: dd32 Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Upload Keywords: ui-feedback
Focuses: multisite Cc:

Description

When in Multisite mode, If you attempt to upload a file that will take you over your usage quota (For example, a 30MB file with the default 10MB limit), the upload will start, and finish with a "HTTP Error" error message.

Expected result: Either the upload would be prevented if the file will take it over the limit, or a error message explaining that they've used up their quota should show.

Attachments (1)

12853.patch (957 bytes) - added by ocean90 4 years ago.

Download all attachments as: .zip

Change History (24)

comment:1 dd324 years ago

uploading smaller files does of course succeed. I see there are some strings that are supposed to convey this error message already, unsure of why they're not showing up.

comment:2 uglyrobot4 years ago

You can't check filesize before uploading with the browser uploader. I think it's possible with the flash uploader but it would be a major rewrite.

comment:3 dd324 years ago

Its possible with the flash uploader, it specifically has a parameter to specify the maximum filesize uploadable, At present, this is set to the hosts maximum upload size.

This ticket has a 2 pronged attack,

  1. The error message shown is non-descriptive, it should mention the fact that they dont have enough quota
  2. It shouldnt allow files greater than min(server_limit, user_limit) from being uploaded.

comment:4 wpmuguru4 years ago

(In [14420]) limit upload size to site's available limit, see #12853

comment:5 wpmuguru4 years ago

(In [14421]) use filter vs action in 14420, see #12853

comment:6 nacin4 years ago

(In [14437]) @since for some new ms functions re: upload file size limits. see #12853.

comment:7 nacin4 years ago

We need to still handle the error message aspect, if possible.

comment:8 wpmuguru4 years ago

(In [14682]) show upload limit in media upload UI, see #12853

comment:9 wpmuguru4 years ago

That could do with some CSS or <h#> tags.

comment:10 wpmuguru4 years ago

(In [14693]) boldly go where no man has gone before, see #12853

comment:11 ocean904 years ago

We get also a HTTP Error when check_admin_referer() fails and when the file size is higher then the allowed file size (ms-options.php).

Both because of the wp_die().

comment:12 wpmuguru4 years ago

(In [14694]) observe fileupload_maxk in media uploader, see #12853

comment:13 ocean904 years ago

[14694] works fine. You need also patch from #12225. Then it looks like this http://grab.by/4pf1

ocean904 years ago

comment:14 ocean904 years ago

In 12853.patch I want to show you my idea. I introduced ASYNC_UPLOAD. If ASYNC_UPLOAD is true, don't use wp_die() and only return $file. Then let wp_handle_upload() handle the error message.

comment:15 wpmuguru4 years ago

(In [14716]) only die on async upload error, see #12853

comment:16 wpmuguru4 years ago

(In [14717]) die in non-async upload in [14716], see #12853

comment:17 wpmuguru4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

If there is still an issue, someone can re-open.

comment:18 dd324 years ago

  • Keywords ux-feedback added
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:19 dd324 years ago

[14693] - That is a bit too bold IMO, That is something thats better suited to a small paragraph text below the upload buttons, I've added ui-feedback in hope someone will come up with some better wording and/or location..

comment:20 dd324 years ago

(In [14776]) We're not as bold as some people make us out to be. Move the maximum upload size from a Heading to a paragraph text. Fix screen formatting on Multisite when over quota. see #12853

comment:21 dd324 years ago

  • Keywords ui-feedback added; ux-feedback removed

Changed it from a header to a paragraph text. Does anyone object to that, have better wording, or a better location for it?

comment:22 johnonolan4 years ago

Nope, I think it works better as paragraph text!

comment:23 ryan4 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.