Files validations

any way to validate files extension and size before upload operation be done ??

I have same question.
I try to search all related dev documents, forum posts.
However there’s no solution.
I also check in node_modules/@strapi/plugin-upload/
I try to setting in plugins.jp with upload.config.validator