- Restriction UI warning

- create folder restriction
- fixed UI bugs
This commit is contained in:
Čarodej
2022-01-05 12:48:07 +01:00
parent c7c11fe5b9
commit b4887cea0e
21 changed files with 306 additions and 71 deletions

View File

@@ -1,6 +1,7 @@
<?php
namespace Domain\Files\Actions;
use App\Users\Exceptions\InvalidUserActionException;
use Illuminate\Support\Str;
use Domain\Sharing\Models\Share;
use Illuminate\Support\Facades\Auth;
@@ -21,6 +22,8 @@ class UploadFileAction
/**
* Upload new file
*
* @throws InvalidUserActionException
*/
public function __invoke(
UploadRequest $request,
@@ -68,7 +71,7 @@ class UploadFileAction
if (! $user->canUpload($fileSize)) {
Storage::disk('local')->delete("chunks/$chunkName");
abort(423, 'You exceed your storage limit!');
throw new InvalidUserActionException();
}
// Move finished file from chunk to file-manager directory