Not Solved Need help to understand javascript coding
Not Solved
(2021-02-24, 01:27 PM)HLFadmin Wrote:
(2021-02-23, 01:18 AM)shedrock Wrote: It pops up a window that says: You can upload a maximum of 872.42 bytes at once.


1. What is the purpose of dividing by 1e4, then by 1e2 then calling the limit in bytes?

The limit actually seems to be stipulated in MB. Shedrock appears to have misquoted the relevant language string.

Apologies. I was looking at the file on my local filesystem, and didn't check that the contents of that line were the same on the current GitHub version to which I linked. You and Shedrock are correct: the language string is incorrect. However, it is fixed by @effone's Further Attachments Overhaul PR, which I just so happened to have checked out on my local filesystem, and which is why I came to the mistaken conclusion that you and Shedrock were mistaken...

See here instead of the link I've struck out:

Or if you're asking the purpose of the divisions, they seem to me to be intended to provide a value rounded to two decimal places. Nevermind. You clearly aren't asking about that.

(2021-02-24, 01:27 PM)HLFadmin Wrote: However, there's an unintentional error in the coding for newreply.php line 1486, newthread.php line 1126, and editpost.php line 934.
$php_max_upload_filesize = return_bytes(ini_get('max_upload_filesize'));
will always return 0 if the directive is not defined.

The correct php directive is upload_max_filesize, not max_upload_filesize.

Confirmed. You appear to have correctly identified a bug. I see that you've reported it in the appropriate place. Thank you!

Messages In This Thread
RE: Need help to understand javascript coding - by Laird - 2021-02-26, 02:32 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)