要将文件从节点上传到 google-cloud-storage (gcs),有记录的过程,例如
const Storage = require('@google-cloud/storage');
const storage = new Storage();
{
const bucket = storage.bucket("bt-name");
const res = await bucket.upload("./output_images/dir/file.png", {
public: true
});
}
Run Code Online (Sandbox Code Playgroud)
但是我想将整个目录上传到bt-name 中的gcs ,当我尝试这样做时,它会抛出承诺拒绝错误 - EISDIR:对目录进行非法操作,请阅读