Skip to content

Instantly share code, notes, and snippets.

@DavidWiesner
Created March 18, 2015 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidWiesner/61293c76442434e026f3 to your computer and use it in GitHub Desktop.
Save DavidWiesner/61293c76442434e026f3 to your computer and use it in GitHub Desktop.
Owncloud Upload Max. 0 B
<?php
public static function maxUploadFilesize($dir, $freeSpace = null) {
if (is_null($freeSpace) || $freeSpace < 0){
$freeSpace = self::freeSpace($dir);
}
return $freeSpace === INF ? self::uploadLimit() : min($freeSpace, self::uploadLimit());
}
@DavidWiesner
Copy link
Author

min(INF, 2) return 0 on my system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment