minor fix
parent
8b9e16fe7a
commit
d94ccb4748
|
|
@ -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
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue