Migrate source code from personal account to CIEF's (round 2)

This commit is contained in:
Dillon
2023-08-24 06:57:51 +08:00
parent ccf9c5c688
commit 9599fae91c
25 changed files with 387 additions and 60 deletions
@@ -99,12 +99,15 @@ class ConvertsBase64ToFile
*/
private function generateFile(FileObject $file, string $suffix = '') {
$filePath = $this->path.'/'.$file->getFileName().$suffix.'.'.$file->getExtension();
// $filePath = $this->path.'/'.$file->getFileName().$suffix.'.'.$file->getExtension();
Storage::disk('documents')->put($filePath, $file->getDecodedData());
// Storage::disk('documents')->put($filePath, $file->getDecodedData());
// return $filePath;
$filePath = 'localhost/'.$file->getFileName().$suffix.'.'.$file->getExtension();
Storage::put($filePath, $file->getDecodedData(), 's3');
return $filePath;
}
/**
@@ -122,4 +125,4 @@ class ConvertsBase64ToFile
]);
}
}
}