This commit is contained in:
2026-04-16 11:25:40 +05:00
parent 2ba5677c45
commit 3aa4601229
13 changed files with 80 additions and 234 deletions

View File

@@ -96,13 +96,10 @@ class ContractService
// 1 - store temp file
$path = storage_path('app/public/' . $oldPath);
// Store the image on S3 or keep local
if (in_array(env('FILESYSTEM_DISK'), ['s3', 'minio'])) {
Storage::disk('s3')->put($oldPath, file_get_contents($path));
}
Storage::put($oldPath, file_get_contents($path));
// 3 - delete resized file
if (in_array(env('FILESYSTEM_DISK'), ['s3', 'minio']) && is_file($path)) {
if (is_file($path)) {
unlink($path);
}
}