diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-15 17:49:36 -0400 |
---|---|---|
committer | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-15 17:49:36 -0400 |
commit | 1ec75330ecf342ef38092934294a6a444bbbdac7 (patch) | |
tree | 658555747f66b90b6547e7fe58ec8f3a9fb19417 /files | |
parent | 801e4f86116c0ef9af4ad93a39b955deaa2f6ce8 (diff) | |
parent | 98997a51fa7883f9da7e9210732daf1a607ff861 (diff) | |
download | nextcloud-server-1ec75330ecf342ef38092934294a6a444bbbdac7.tar.gz nextcloud-server-1ec75330ecf342ef38092934294a6a444bbbdac7.zip |
Merge branch 'master' into sharing
Diffstat (limited to 'files')
-rw-r--r-- | files/ajax/upload.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/files/ajax/upload.php b/files/ajax/upload.php index 5dcd2f2b6af..4247aeca283 100644 --- a/files/ajax/upload.php +++ b/files/ajax/upload.php @@ -19,6 +19,16 @@ $files=$_FILES['files']; $dir = $_POST['dir']; if(!empty($dir)) $dir .= '/'; $error=''; + +$totalSize=0; +foreach($files['size'] as $size){ + $totalSize+=$size; +} +if($totalSize>OC_Filesystem::free_space('/')){ + echo json_encode( array( "status" => "error", "data" => array( "message" => "Not enough space available" ))); + exit(); +} + $result=array(); if(strpos($dir,'..') === false){ $fileCount=count($files['name']); |