imagekit-developer/imagekit-react

Using IKUpload and check file size upload

ducyb782001 opened this issue · 1 comments

Is the any way to using IK Upload and check file size upload, if file size chosen is more than 5mb => Stop process of upload.
Many thanks

Please use validateFile to run any custom validation logic.

See this sample - https://github.com/imagekit-samples/quickstart/blob/master/react/src/App.js#L53

validateFile={file => file.size < 5242880}