Skip to content

Commit 2bcc598

Browse files
committed
fix problem where file size would not be calculated correctly for multiple files
1 parent 4df4fde commit 2bcc598

6 files changed

+10
-10
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 PQINA
3+
Copyright (c) 2018 PQINA | Rik Schennink <[email protected]>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

dist/filepond-plugin-file-validate-size.esm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* FilePondPluginFileValidateSize 1.0.3
2+
* FilePondPluginFileValidateSize 1.0.4
33
* Licensed under MIT, https://opensource.org/licenses/MIT
44
* Please visit https://pqina.nl/filepond for details.
55
*/
@@ -56,7 +56,7 @@ var plugin$1 = ({ addFilter, utils }) => {
5656
}, 0);
5757

5858
// get the size of the new file
59-
if (currentTotalSize + file.size > totalSizeMax) {
59+
if (currentTotalSize > totalSizeMax) {
6060
reject({
6161
status: {
6262
main: query('GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED'),

dist/filepond-plugin-file-validate-size.esm.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/filepond-plugin-file-validate-size.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* FilePondPluginFileValidateSize 1.0.3
2+
* FilePondPluginFileValidateSize 1.0.4
33
* Licensed under MIT, https://opensource.org/licenses/MIT
44
* Please visit https://pqina.nl/filepond for details.
55
*/
@@ -76,7 +76,7 @@
7676
0);
7777

7878
// get the size of the new file
79-
if (currentTotalSize + file.size > totalSizeMax) {
79+
if (currentTotalSize > totalSizeMax) {
8080
reject({
8181
status: {
8282
main: query('GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED'),

dist/filepond-plugin-file-validate-size.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "filepond-plugin-file-validate-size",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "File Size Validation Plugin for FilePond",
55
"homepage": "https://pqina.nl/filepond",
66
"repository": "pqina/filepond-plugin-file-validate-size",

0 commit comments

Comments
 (0)