diff options
Diffstat (limited to 'apps/files/ajax/upload.php')
-rw-r--r-- | apps/files/ajax/upload.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 5bf69d3e304..36aaed5ad9e 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -136,8 +136,12 @@ $maxUploadFileSize = $storageStats['uploadMaxFilesize']; $maxHumanFileSize = OCP\Util::humanFileSize($maxUploadFileSize); $totalSize = 0; -foreach ($files['size'] as $size) { - $totalSize += $size; +$isReceivedShare = \OC::$server->getRequest()->getParam('isReceivedShare', false) === 'true'; +// defer quota check for received shares +if (!$isReceivedShare) { + foreach ($files['size'] as $size) { + $totalSize += $size; + } } if ($maxUploadFileSize >= 0 and $totalSize > $maxUploadFileSize) { OCP\JSON::error(array('data' => array('message' => $l->t('Not enough storage available'), |