Last modified: 2007-12-05 20:19:26 UTC
$1 is showing as 4.77MB, although the maximum is 20MB. A user reported receiving this warning and I confirmed it. I uploaded an 11MB file and got the warning. It's not very useful...there should only be one relevant figure: the maximum allowed file size. If you try to upload a file larger than that, you are not allowed. I don't think there is any point in giving people a warning that they can override for lower values.
I'm not sure this is really a "bug" as such -- there's a hard limit of 20MB on uploads, and also a soft limit of 5MB. When a file is above the 5MB limit, we ask them if they really want to upload such a large file... Perhaps some of the messages could be phrased more informatively.
Has this always been the case? I have to say I am surprised that I have never seen this before. (Maybe I always had 'ignore all warnings' ticked...) Secondly, where is the "soft limit" set? If it is 5MB why does it report as 4.77MB? Thirdly, it's not useful anyway, it's just confusing. We encourage people to upload as hi-res as possible - we usually don't want them to compress their files. We let people upload up to 20MB. So let's just let them do that and remove this "soft limit" altogether.
I don't know that we do always "encourage people to upload as hi-res as possible", not wanting "them to compress their files". PNG and GIF files with dimensions greater than about 12 megapixels are intentionally not resized, and JPEG images with an IJG quality setting above 95 have greatly increased filesizes without a corresponding increase in actual image quality. "5MB" was just a rounding of 4.77.
(In reply to comment #3) > I don't know that we do always "encourage people to upload as hi-res as > possible", not wanting "them to compress their > files". PNG and GIF files with dimensions greater than about 12 megapixels are > intentionally not resized, and JPEG images with an IJG quality setting above 95 > have greatly increased filesizes without a corresponding increase in actual > image quality. These are minor cases for which it is appropriate to inform individual users and/or develop specific warnings for these cases. Not a generic upload form warning. None of which explains why 4.77MB was decided as an appropriate soft limit anyway.
There's no "soft limit", but there is a *warning* displayed for files above $wgUploadSizeWarning bytes in size. It's not a maximum, just a recommendation. The warning size is currently set at 5,000,000 bytes. That's about 5 megabytes, which is a pretty decent size for good digital camera photos in JPEG format. It does look a little silly when formatted in megabytes, so I've upped the limit to 5,242,880 bytes which is exactly 5 megabytes and will display as a clean "5 MB".