File::make('File')
->disk('downloads')
->storeAs(function (Request $request) {
Log::info($request);
Log::info($request->file);
return sha1($request->file->getClientOriginalName());
}),
Will store the file, but not with the original name? What I am missing here?
[2022-12-20 15:38:04] local.INFO: array (
'name' => 'H7s3keKQ58',
'_method' => 'PUT',
'_retrieved_at' => '1671550678',
'viaResource' => NULL,
'viaResourceId' => NULL,
'viaRelationship' => NULL,
'editing' => 'true',
'editMode' => 'update',
'file' =>
Illuminate\Http\UploadedFile::__set_state(array(
'test' => false,
'originalName' => 'automation_1.jpg',
'mimeType' => 'image/jpeg',
'error' => 0,
'hashName' => NULL,
)),
)
[2022-12-20 15:38:04] local.INFO: /tmp/phpIuksKG
I would like the Nova to upload the file using the automation_1.jpg file name, not the random string.