Client side input #122

Merged
bones7242 merged 3 commits from client-side-input into master 2017-07-29 00:39:17 +02:00
Showing only changes of commit cbc87c40b8 - Show all commits

View file

@ -5,6 +5,9 @@ function validateFile(file) {
if (!file) {
throw new Error('no file provided');
}
if (/'/.test(file.name)) {
throw new Error('apostrophes are not allowed in the file name');
}
// validate size and type
switch (file.type) {
case 'image/jpeg':