Skip to main content
Topic: maximum attachment size (Read 3098 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

maximum attachment size

I have set the maximum size of attachments to 30.720 KB for the summary all attachments and 10.240 KB for each attachment in the admin center.

When I post a message, the editor says I can attach a file with a maximum size of 204.800 KB and all attachments can have the same size in summary.

It seems the admin settings work, I can't upload a larger file then 10 MB. But what's wrong with the editor?

Re: maximum attachment size

Reply #1

Are you using the Resize attachments add-on? If so and iirc that size you are seeing is setup by you host limits.
sorry for my bad english

Re: maximum attachment size

Reply #2

Could be some math or conversion between php and js.
I have to turn on the admin account and see here what are the limits.
Bugs creator.
Features destroyer.
Template killer.

Re: maximum attachment size

Reply #3

Quote from: Spuds – ... when you go to reply, what does it say in the attachment area, there should be a line like .... (Restrictions: 20 per post, maximum total size 8,192 KB, maximum individual size 4,096 KB) The size values should be your server max limits (as determined by the addon), not the limits set in the admin panel.  If the addon is off then it would show the admin panel limits.
and
Quote from: Spuds – What values are in your phpinfo() ( can use admin-> main -> support and credits and select more detailed next to php info for:

upload_max_filesize
post_max_size


 
sorry for my bad english

Re: maximum attachment size

Reply #4

Thanks, radu. Both says 200 MB as maximum. So that's where the editor gets this from.

But why does he shows 200 MB as maximum when the admin panel is set to 30 MB max?

Re: maximum attachment size

Reply #5

When you install the Resize Attachments add-on the settings you set in admin panel are ignored using your host limits. It'snot a bug, it's just how this add-on works. I get 1GB limits
sorry for my bad english

Re: maximum attachment size

Reply #6

Hm... But I can attach PDFs which cannot be resized. So my users think they can attach 200 MB PDF files, but they can't.  :-X

Re: maximum attachment size

Reply #7

Quote from: radu81 – When you install the Resize Attachments add-on the settings you set in admin panel are ignored using your host limits. It'snot a bug, it's just how this add-on works. I get 1GB limits
 
 Doesn't work that way on any of mine. The limit is the lesser of ACP settings or php.ini.

Re: maximum attachment size

Reply #8

@badmonkey‍ see the reply 3 in this topic from Spuds.

Here is what I have in Elk ACP
Code: [Select]
Max attachment size per post: 9600 KB
Max size per attachment: 5000 KB
Max number of attachments per post: 15

Here are my PHP settings:
Code: [Select]
upload_max_filesize 512M
post_max_size 1024M


And this is the result I get in Elkarte under post reply
Code: [Select]
 Restrictions: 15 per post, maximum total size 1,048,576 KB, maximum individual size 524,288 KB
sorry for my bad english

Re: maximum attachment size

Reply #9

Huh. Somehow that has escaped comprehension. Good info. That being the case, it may be a good idea to spell it out for us dummies.   :D

Re: maximum attachment size

Reply #10

I agree, it's not very clear, I discovered that info from Spuds. 
sorry for my bad english

Re: maximum attachment size

Reply #11

Then you have to summon @Spuds and blame him! :P
Bugs creator.
Features destroyer.
Template killer.


Re: maximum attachment size

Reply #13

I can see how all that can be confusing ... especially when dealing with non image files which will be rejected for size even though they are under the limits given by the form.

I think ideally the line would read one size (that max size per PHP limits) for images and another size per the ACP (for non image files).

The addon has to initiate the post attachment form with the PHP limits so teh client will allow the user to upload a file of that max allowable size.  If I leave the values as set in the ACP the form / browser / http would refuse to send the file.   

The ACP limits are still enforced on the server side, this allows the form to send a larger file and gives the server an opportunity to compress it to fit within those ACP limits.  That compression only works for images so large files,  like PDF's get rejected server side (instead of client side) which can create a WTF moment for the user as the form limit says its fine.

The cleanest thing may be to allow limits to be set independently for image files and non-image file size limits, but that would take rework of the attachment JS and is a beyond what the addon can (or should) do.  This is maybe something for 2.0, and in the meantime I could check if I can add more clear text to that limit line on the form.

Re: maximum attachment size

Reply #14

I don't think this one is tracked yet for 2.0.