feat: download and get storage files as private (#5192)

This commit is contained in:
Alexis Saettler
2021-06-22 18:37:38 +02:00
committed by GitHub
parent c3f3eac1b9
commit 7fdc4453b6
23 changed files with 678 additions and 48 deletions
+4 -1
View File
@@ -462,7 +462,10 @@ class ContactsController extends Controller
}
$contact->has_avatar = true;
$contact->avatar_location = config('filesystems.default');
$contact->avatar_file_name = $request->avatar->storePublicly('avatars', $contact->avatar_location);
$contact->avatar_file_name = $request->file('avatar')->store('avatars', [
'disk' => $contact->avatar_location,
'visibility' => config('filesystems.default_visibility'),
]);
$contact->save();
}