You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a custom validator that limits the total file size of all files. I'm using the useImperativeFilePicker hook. For example, suppose a user selects a 50MB file, then after their initial selection they go back to the picker and select another 50MB file. I want to be able to calculate the total file size from the 2 files despite them being in different selections. I read the documentation about creating custom validation, but in the validateBeforeParsing method the plainFiles argument only contains data for the current selection and not the existing files. Wondering if you have any tips to get it up and running? Thanks
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
@MrKampla @Jaaneek @Forsect
Thanks for all your help guys!
I'm trying to create a custom validator that limits the total file size of all files. I'm using the useImperativeFilePicker hook. For example, suppose a user selects a 50MB file, then after their initial selection they go back to the picker and select another 50MB file. I want to be able to calculate the total file size from the 2 files despite them being in different selections. I read the documentation about creating custom validation, but in the validateBeforeParsing method the plainFiles argument only contains data for the current selection and not the existing files. Wondering if you have any tips to get it up and running? Thanks
Beta Was this translation helpful? Give feedback.
All reactions