mirror of
https://github.com/nextcloud/server.git
synced 2026-04-04 08:35:50 -04:00
Add error message when uploading folder or null files. ref oc-739
This commit is contained in:
parent
a1539dace7
commit
2c9311cf48
1 changed files with 5 additions and 0 deletions
|
|
@ -194,6 +194,11 @@ $(document).ready(function() {
|
|||
var totalSize=0;
|
||||
if(files){
|
||||
for(var i=0;i<files.length;i++){
|
||||
if(files[i].size ==0 && files[i].type== '')
|
||||
{
|
||||
OC.dialogs.alert('Unable to upload your file as it is a directory or has 0 bytes','Upload Error');
|
||||
return;
|
||||
}
|
||||
totalSize+=files[i].size;
|
||||
if(FileList.deleteFiles && FileList.deleteFiles.indexOf(files[i].name)!=-1){//finish delete if we are uploading a deleted file
|
||||
FileList.finishDelete(function(){
|
||||
|
|
|
|||
Loading…
Reference in a new issue