Pārlūkot izejas kodu

Throttle getstoragestats.php calls and allow simultaneous uploads

Signed-off-by: Tomasz Grobelny <tomasz@grobelny.net>
tags/v16.0.0alpha1
Tomasz Grobelny pirms 5 gadiem
vecāks
revīzija
f99ce0d546
2 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  1. 2
    1
      apps/files/js/file-upload.js
  2. 4
    0
      apps/files/js/files.js

+ 2
- 1
apps/files/js/file-upload.js Parādīt failu

@@ -845,7 +845,8 @@ OC.Uploader.prototype = _.extend({
type: 'PUT',
dropZone: options.dropZone, // restrict dropZone to content div
autoUpload: false,
sequentialUploads: true,
sequentialUploads: false,
limitConcurrentUploads: 10,
//singleFileUploads is on by default, so the data.files array will always have length 1
/**
* on first add of every selection

+ 4
- 0
apps/files/js/files.js Parādīt failu

@@ -33,6 +33,9 @@
},
// update quota
updateStorageQuotas: function() {
Files._updateStorageQuotasThrottled();
},
_updateStorageQuotas: function() {
var state = Files.updateStorageQuotas;
state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php'),function(response) {
Files.updateQuota(response);
@@ -356,6 +359,7 @@
};

Files._updateStorageStatisticsDebounced = _.debounce(Files._updateStorageStatistics, 250);
Files._updateStorageQuotasThrottled = _.throttle(Files._updateStorageQuotas, 30000);
OCA.Files.Files = Files;
})();


Notiek ielāde…
Atcelt
Saglabāt