Procházet zdrojové kódy

Do not iterate over the files

As "singleFileUpload" is used the "add" callback (which in turn calls
"addFileToUpload") will always be called with a single file. Therefore
there is no need to iterate over the files (and it is not done in the
other callbacks either, so this aligns the code with the rest of the
callbacks).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
tags/v13.0.0beta1
Daniel Calviño Sánchez před 6 roky
rodič
revize
4d003c812d
1 změnil soubory, kde provedl 4 přidání a 5 odebrání
  1. 4
    5
      apps/files_sharing/js/files_drop.js

+ 4
- 5
apps/files_sharing/js/files_drop.js Zobrazit soubor

@@ -63,11 +63,10 @@
$('#drop-upload-done-indicator').addClass('hidden');
$('#drop-upload-progress-indicator').removeClass('hidden');
_.each(data['files'], function(file) {
$('#public-upload ul').append(output({isUploading: true, name: file.name}));
$('[data-toggle="tooltip"]').tooltip();
data.submit();
});

$('#public-upload ul').append(output({isUploading: true, name: data.files[0].name}));
$('[data-toggle="tooltip"]').tooltip();
data.submit();
return true;
},

Načítá se…
Zrušit
Uložit