MG 1.1 Error message file too big

teletubbi

Well-known member
One user have trouble to upload some pictures.

Went till 100% an than the error came up.

I have set the global quota to 1024x 1024 and filesize to 20mb. (was less before I increased only for testing)

Screenshot_com.android.chrome_2016-05-13-10-26-01.webp

One of the picture he try to upload has the dimensions of 5760x3840 and 944kb.

The settings in PHP are high enough.
 
That's a large image so it likely exceeds the maximum pixel count. You can control this with config.php:
PHP:
$config['maxImageResizePixelCount'] = 24000000;

The default is 20000000. The pixel count is calculated by multiplying the dimensions, so 22118400. If the pixel count exceeds the max pixel count we can't resize it and files above that size will be rejected.

Changing the config.php value will only work if you have sufficient memory on the server.

If you still have problems after raising the limit then you likely need to get the user to resize the image themselves before uploading.
 
Hi Chris,
this works. But if we have a border like this the settings for unlimited are not really unlimited.
I did not know about this value before so I was wondering if settings all set to unlimited why it does not work.
 
There's no such thing as unlimited.

If we didn't have this value (it's in XF and affects post attachments too) then your server wouldn't be too happy if someone tried to upload a 30 megapixel image or something even more ridiculous.

Easily adjusted though.
 
There's no such thing as unlimited.

Than the settings are mislabeled.

Screenshot_com.android.chrome_2016-05-18-02-35-00.webp

For me unlimited means unlimited if I don't have other information. I can pick up the meaning only from what is shown to me.

We have more points in settings who use the term unlimited. There are more who have borders who are triggered by config.php?
 
Last edited:
Well, the point is, there's no such thing as "unlimited".

For example, if you only have 1MB of free disk space on the server, how can you allow someone to upload a 10MB file? It's impossible. There's always a limit somewhere.

The limit is in place so there's a hard limit on the maximum size at which we will attempt to resize an image. It's no good attempting to resize an image, which is a memory intensive operation, if there's not enough memory available to the server to handle it. If we attempted to resize an image too large for your server to handle, your user's entire upload would likely fail, or worse cause your site major problems due to lack of memory. It's there for a very good reason. Off the top of my head, I don't recall there being any other settings which have similar limits.

The settings are not mislabeled. Besides, they relate to something completely different. This limit that can be changed in config.php relates to the maximum pixel count that can be resized, and isn't actually related to the maximum file size that can be stored.
 
@Chris D
I understand all the reasons. Don't worry.

For me it it just a question of definition.
English is not my native language. So maybe I understood it wrong.

If I see a setting what is called unlimited and I have no knowledge about the limitations behind it (I just know there is a trigger from this thread) it means unlimited for me.
The limits even for unlimited are always set due the hardware behind. This is totally clear. But I was not aware that there are also limits who are triggered by a value in the software.
Did not find any explanation about it before. Maybe I missed it.

At the end it is working as expected. That was my goal.
The rest here is only a typical German thing. :cool:
 
Top Bottom