I know I can use the Javascript API to restrict uploads by filetypes and by maximimum size. Can I restrict the upload of certain filetypes by their size, e.g. No Excel files greater than 1mb and No CSV files greater than 500kb?

This is not currently possible in v2. You can specify multiple filetypes, but you can only set one maxSize per session. So that max file size will apply to all filetypes you specify.

Using the v3 picker it is possible to customize your own functions. So it is possible to prevent the upload of specific filetypes and file sizes.


Restrict Files by their Size and Type

Restrict Files by their Size and Type
client.pick({ onFileSelected: function(file) { console.log(file.size); console.log(file.filename); console.log(file.mimetype); if (file.size > 512000 && file.mimetype == 'text/csv') { throw new Error('Please select a CSV smaller than 500KB'); } if (file.size > 1048576 && file.mimetype == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') { throw new Error('Please select an XLSX file smaller than 1MB'); } } }).then(function(result) { console.log(JSON.stringify(result.filesUploaded)) })