test
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user