Open rowan-simms opened 8 years ago
R.e. the mime type, you should be able to specify file types using the acceptedExtensions
option (e.g. ['json']
) however that just 'suggests' which file types can be uploaded, however for some operating systems (ubuntu?) it doesn't prevent you from selecting files of other types from the file upload dialog.
An option for validator
should be added that is run for every file when selected. It should probably be async in case the validator needs to be server side, I'd suggest a signature something like:
validator: function (file, callback) {
var isValid = // Boolean: file is valid
callback(file, isValid)
}
eg to check the mime type is valid, or to check the format of the file