mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-20 17:02:16 +00:00
s3 bandwidth usage fix
This commit is contained in:
@@ -38,12 +38,12 @@ class ZipAction
|
||||
// Add file into zip
|
||||
if (Storage::exists($filePath)) {
|
||||
// local disk
|
||||
if (is_storage_driver('local')) {
|
||||
if (isStorageDriver('local')) {
|
||||
$zip->add(Storage::path($filePath), $file->name);
|
||||
}
|
||||
|
||||
// s3 client
|
||||
if (is_storage_driver('s3')) {
|
||||
if (isStorageDriver('s3')) {
|
||||
$bucketName = config('filesystems.disks.s3.bucket');
|
||||
|
||||
$zip->add("s3://$bucketName/$filePath", $file->name);
|
||||
@@ -75,12 +75,12 @@ class ZipAction
|
||||
$zipDestination = "{$file['folder_path']}/{$file['name']}";
|
||||
|
||||
// local disk
|
||||
if (is_storage_driver('local')) {
|
||||
if (isStorageDriver('local')) {
|
||||
$zip->add(Storage::path($filePath), $zipDestination);
|
||||
}
|
||||
|
||||
// s3 client
|
||||
if (is_storage_driver('s3')) {
|
||||
if (isStorageDriver('s3')) {
|
||||
$bucketName = config('filesystems.disks.s3.bucket');
|
||||
|
||||
$zip->add("s3://$bucketName/$filePath", $zipDestination);
|
||||
|
||||
Reference in New Issue
Block a user