ftp implementation

This commit is contained in:
Čarodej
2022-04-11 09:34:25 +02:00
parent 7740e1673f
commit fbc9eed30b
12 changed files with 192 additions and 83 deletions

View File

@@ -48,6 +48,11 @@ class ZipAction
$zip->add("s3://$bucketName/$filePath", $file->name);
}
// ftp client
if (isStorageDriver('ftp')) {
$zip->addRaw(Storage::get($filePath), $file->name);
}
}
});
@@ -79,12 +84,15 @@ class ZipAction
$zip->add(Storage::path($filePath), $zipDestination);
}
// s3 client
if (isStorageDriver('s3')) {
$bucketName = config('filesystems.disks.s3.bucket');
$zip->add("s3://$bucketName/$filePath", $zipDestination);
}
if (isStorageDriver('ftp')) {
$zip->addRaw(Storage::get($filePath), $zipDestination);
}
}
}
});