Restricting file extensions uploaded through REST API

I know you can restrict the file extensions uploaded through a file upload field, but is the same possible through the REST API? What I’m looking for would preferably be a global whitelist of file extensions which can be uploaded to the app regardless of source.