Merge pull request #6243 from pixelfed/shleeable-patch-6

Larastan: Update ResilientMediaStorageService.php (Variable $file might not be defined. )
pull/6261/head
dansup 2 weeks ago committed by GitHub
commit e9c742a5e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -41,8 +41,11 @@ class ResilientMediaStorageService
try {
$disk = Storage::disk($baseDisk);
$file = $disk->putFileAs($storagePath, new File($path), $name, 'public');
} catch (S3Exception | ClientException | ConnectException | UnableToWriteFile | Exception $e) {}
return $disk->url($file);
return $disk->url($file);
} catch (S3Exception | ClientException | ConnectException | UnableToWriteFile | Exception $e) {
Log::warning("ResilientMediaStorageService: Failed to handle Resilient Store {$file} : " . $e->getMessage());
throw $e;
}
}, function (int $attempt, Exception $exception) {
return $attempt * 200;
});

Loading…
Cancel
Save