Skip to content

Commit 9be02c6

Browse files
committed
Added use statement
Signed-off-by: snipe <[email protected]>
1 parent 1e4d452 commit 9be02c6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/Http/Requests/UploadFileRequest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use enshrined\svgSanitize\Sanitizer;
77
use Illuminate\Support\Facades\Storage;
88
use Illuminate\Support\Facades\Log;
9+
use \App\Helpers\Helper;
910

1011
class UploadFileRequest extends Request
1112
{
@@ -27,7 +28,7 @@ public function authorize()
2728
*/
2829
public function rules()
2930
{
30-
$max_file_size = \App\Helpers\Helper::file_upload_max_size();
31+
$max_file_size = Helper::file_upload_max_size();
3132

3233
return [
3334
'file.*' => 'required|mimes:png,gif,jpg,svg,jpeg,doc,docx,pdf,txt,zip,rar,xls,xlsx,lic,xml,rtf,json,webp,avif|max:'.$max_file_size,
@@ -37,9 +38,6 @@ public function rules()
3738
/**
3839
* Sanitizes (if needed) and Saves a file to the appropriate location
3940
* Returns the 'short' (storage-relative) filename
40-
*
41-
* TODO - this has a lot of similarities to UploadImageRequest's handleImage; is there
42-
* a way to merge them or extend one into the other?
4341
*/
4442
public function handleFile(string $dirname, string $name_prefix, $file): string
4543
{

0 commit comments

Comments
 (0)