Open martinoss opened 1 year ago
I just noticed that the total file size calculation possibly has a bug.
It seems that when adding a single file, it will be counted twice for the total size over all files.
How to reproduce
A first look into the source suggests that these two lines probably needs to be flipped.
https://github.com/axa-ch-webhub-cloud/pattern-library/blob/eca9f02be6af012e649036d337cf1034afe8fc48/src/components/20-molecules/file-upload/index.js#L442-L443
On line 406, sizeOfAllFilesInBytes already has the value of 512000 when previewing the future total including the new file to be added.
sizeOfAllFilesInBytes
https://github.com/axa-ch-webhub-cloud/pattern-library/blob/eca9f02be6af012e649036d337cf1034afe8fc48/src/components/20-molecules/file-upload/index.js#L398-L413
I just noticed that the total file size calculation possibly has a bug.
It seems that when adding a single file, it will be counted twice for the total size over all files.
How to reproduce
A first look into the source suggests that these two lines probably needs to be flipped.
https://github.com/axa-ch-webhub-cloud/pattern-library/blob/eca9f02be6af012e649036d337cf1034afe8fc48/src/components/20-molecules/file-upload/index.js#L442-L443
On line 406,
sizeOfAllFilesInBytes
already has the value of 512000 when previewing the future total including the new file to be added.https://github.com/axa-ch-webhub-cloud/pattern-library/blob/eca9f02be6af012e649036d337cf1034afe8fc48/src/components/20-molecules/file-upload/index.js#L398-L413