import { Storage, File, Bucket } from '@google-cloud/storage';
const Zip = require('zip-bucket');
const storage = new Storage();
const bucket = storage.bucket('bucket_name');
const zipper = Zip(storage);
const zipResult = await zipper({
fromBucket: 'bucket_name',
fromPath: `folder_name/`,
toBucket: 'bucket_name',
toPath: `new_file_name.zip`,
});
目标存储桶和源存储桶相同。 我正在尝试压缩云存储中文件夹中的所有文件并将文件保存在同一个存储桶中。
这是谷歌云运行日志上的错误
如果您可以分享整个代码以及阅读长度,这将有助于理解这个问题。