azure implementation

This commit is contained in:
Čarodej
2022-04-11 11:59:16 +02:00
parent fbc9eed30b
commit e5f4bad9a9
6 changed files with 314 additions and 99 deletions
@@ -85,7 +85,7 @@ class UploadFileAction
// Move files to external storage
match (config('filesystems.default')) {
's3' => ($this->moveFileToExternalStorage)($fileName, $user->id),
'ftp' => ($this->moveFileToFTPStorage)($fileName, $user->id),
'ftp', 'azure' => ($this->moveFileToFTPStorage)($fileName, $user->id),
};
// Create new file
+1 -1
View File
@@ -101,7 +101,7 @@ class File extends Model
->all();
// Generate thumbnail link for external storage service
if ($this->type === 'image' && isStorageDriver('s3')) {
if ($this->type === 'image' && isStorageDriver(['s3', 'azure'])) {
foreach ($thumbnail_sizes as $item) {
$filePath = "files/{$this->user_id}/{$item['name']}-{$this->basename}";