diff --git a/apps/files_sharing/js/files_drop.js b/apps/files_sharing/js/files_drop.js index 64051844d0..ba5bd82cc4 100644 --- a/apps/files_sharing/js/files_drop.js +++ b/apps/files_sharing/js/files_drop.js @@ -46,7 +46,14 @@ var errors = []; var name = data.files[0].name; - + try { + // FIXME: not so elegant... need to refactor that method to return a value + Files.isFileNameValid(name); + } + catch (errorMessage) { + OC.Notification.show(errorMessage, {type: 'error'}); + return false; + } var base = OC.getProtocol() + '://' + OC.getHost(); data.url = base + OC.getRootPath() + '/public.php/webdav/' + encodeURI(name);