minor fix

master
Константин 2024-02-05 19:43:41 +03:00
parent 8b9e16fe7a
commit d94ccb4748
1 changed files with 0 additions and 2 deletions

View File

@ -108,7 +108,6 @@ class UploadFileController extends Controller {
} }
protected function uploadFromDirectFile($attributes = []) { protected function uploadFromDirectFile($attributes = []) {
Storage::put("validating/" . ($attributes['name'] ?? 'unnamed'), $attributes['content']);
$this->validateMime($attributes['mime']); $this->validateMime($attributes['mime']);
$this->validateBodySize($attributes['Content-Length'], $attributes['content']); $this->validateBodySize($attributes['Content-Length'], $attributes['content']);
$path = $this->storeInFileSystem($attributes); $path = $this->storeInFileSystem($attributes);
@ -166,7 +165,6 @@ class UploadFileController extends Controller {
if (!array_key_exists($mime, $this->validMimes)) { if (!array_key_exists($mime, $this->validMimes)) {
throw new StoreResourceFailedException('Validation Error', [ throw new StoreResourceFailedException('Validation Error', [
'Content-Type' => 'The Content Type sent is not valid', 'Content-Type' => 'The Content Type sent is not valid',
'mime' => $mime
]); ]);
} }
} }