Smf2.1: Attachment Size Issue

Created on 5 Apr 2017  路  9Comments  路  Source: SimpleMachines/SMF2.1

We are incorrectly reporting max attachment sizes per each and all attachments per post.

When 1000KB is being set for either setting, a 1KB maximum is being reported.

Attachments aren't being rejected for being larger than incorrectly reported size level, but the text is incorrect.
screen shot 2017-04-04 at 23 36 55
screen shot 2017-04-04 at 23 36 46

Attachments Minor Bug

All 9 comments

I can't reproduce this... Latest download from github:
image
image

There were a bunch of similar issues resolved back in January:
Attachment size issues - minor but annoying #3772

Is it possible you have old files??? I wonder if the .js files got cached in your browser?

Try using exactly 1000 KB

Just did, you're correct.

I think I recall this now... I wanted to make it display figures exactly as SMF (e.g,. 1000K). I believe this was an issue purely within dropzone.js. It wants to work purely with Ks of 1000 or with Ks of 1024. SMF tells dropzone to use a 'filebase' of 1024, which is consistent with internal SMF math.

Dropzone will never display 4 digits to the left of the decimal point, it tries to shoehorn everything into GB, MB, KB, etc., using a strict base of 1024, while ONLY displaying 1-3 digits to the left of the decimal point... It won't display 1M until you go up to 1024K, & it does fine of course with 999K.

Thus, it gets confused with values of 1000K-1023K (or MB, or GB)... It has problems with all these edge conditions.

I believe the applicable code is here:
https://github.com/enyo/dropzone/blob/master/dist/dropzone.js#L834

We don't have that code in SMF, we have the minimized version, dropzone.min.js.

I was tempted to remove that message altogether... Sizes are reported multiple times on that screen, & in slightly different formats.

(It's been a while... But I think that logic works for SMF (speaking in Ks) if you remove TB, GB & MB from its table???)

Good find, thanks.

Hmm, where else are sizes reported prior to uploading a file? I only see size restrictions being reported after the files are selected.

Correct, none before. But once you get an error list, you're told a few times....

Hmm, ok that seems fine. I think as soon as they select a file advising them of the requirements is good enough. I'm convinced removing that message is :+1:

When you set unlimited (0), SMF showing remaining/total as 0 instead "unlimited".

Was this solved with #4004? @colinschoen

If so, please close :)

Yes, this is fixed with #4004.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jdarwood007 picture jdarwood007  路  5Comments

sbulen picture sbulen  路  10Comments

albertlast picture albertlast  路  12Comments

albertlast picture albertlast  路  11Comments

realdigger picture realdigger  路  8Comments