Open
Description
Method for GC Storage:
// ...
async bucketExists(): Promise<boolean> {
const { storage, bucket } = this.config;
try {
const [exists] = await storage.bucket(bucket).exists();
return exists;
} catch (e) {
return false;
}
}
//...
- Method for AWS S3:
async bucketExists(): Promise<boolean> {
const { s3, bucket: Bucket } = this.config;
try {
await s3.headBucket({ Bucket });
return true;
} catch (e) {
return false;
}
}
Metadata
Metadata
Assignees
Labels
No labels