Skip to content

Commit

Permalink
Fixes JS logic to check max attachment size per post
Browse files Browse the repository at this point in the history
Fixes #7488

Signed-off-by: Jon Stovell <[email protected]>
  • Loading branch information
Sesquipedalian committed May 10, 2024
1 parent 7a757ab commit 3206bc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Themes/default/scripts/smf_fileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function smf_fileUpload(oOptions) {
myDropzone.options.currentUsedSize = myDropzone.options.currentUsedSize + file.size;

// This file has reached the max total size per post.
if (totalKB > 0 && currentlyUsedKB > totalKB) {
if (totalKB > 0 && (currentlyUsedKB + uploadedFileKB) > totalKB) {
done(myDropzone.options.text_totalMaxSize.replace('{currentTotal}', totalKB).replace('{currentRemain}', currentlyUsedKB));

// Remove the file size from the total
Expand Down

0 comments on commit 3206bc1

Please sign in to comment.