Laravel Vapor - sync code for download files in bulk from S3 to more files

This commit is contained in:
Dillon Ngo
2024-04-29 14:57:15 +08:00
parent 4c5ce234b6
commit 357a4fde66
8 changed files with 16 additions and 12 deletions
@@ -100,7 +100,7 @@ class ConvertsBase64ToFile
private function generateFile(FileObject $file, string $suffix = '') {
$filesystemDriver = Storage::getDefaultDriver();
if($filesystemDriver == 's3'){
if($filesystemDriver === 's3'){
$filePath = 'documents/'.$this->path.'/'.$file->getFileName().$suffix.'.'.$file->getExtension();
Storage::put($filePath, $file->getDecodedData(), 's3');
return $filePath;