Skip to content

Commit

Permalink
fix: storage_limit can be unlimited
Browse files Browse the repository at this point in the history
  • Loading branch information
SecurID committed Oct 31, 2023
1 parent 0e4d192 commit b6348a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Helpers/StorageHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ class StorageHelper
*/
public static function canUploadFile(Account $account): bool
{
// if storage limit is 0 then unlimited storage is allowed
// therefore the function should always return true
if ($account->storage_limit_in_mb == 0) {
return true;
}
// get the file size of all the files in the account
// the size will be in bytes
$vaultIds = $account->vaults()->select('id')->get()->toArray();
Expand Down

0 comments on commit b6348a8

Please sign in to comment.