upd: check if endpoint includes bunnycdn.com
This commit is contained in:
@@ -407,7 +407,7 @@ export class DriveService {
|
|||||||
);
|
);
|
||||||
if (this.meta.objectStorageSetPublicRead) params.ACL = 'public-read';
|
if (this.meta.objectStorageSetPublicRead) params.ACL = 'public-read';
|
||||||
|
|
||||||
if (this.meta.objectStorageAccessKey) {
|
if (this.meta.objectStorageAccessKey && !this.meta.objectStorageEndpoint?.includes('bunnycdn.com')) {
|
||||||
await this.s3Service.upload(this.meta, params)
|
await this.s3Service.upload(this.meta, params)
|
||||||
.then(
|
.then(
|
||||||
result => {
|
result => {
|
||||||
@@ -820,7 +820,7 @@ export class DriveService {
|
|||||||
Bucket: this.meta.objectStorageBucket,
|
Bucket: this.meta.objectStorageBucket,
|
||||||
Key: key,
|
Key: key,
|
||||||
} as DeleteObjectCommandInput;
|
} as DeleteObjectCommandInput;
|
||||||
if (this.meta.objectStorageAccessKey) {
|
if (this.meta.objectStorageAccessKey && !this.meta.objectStorageEndpoint?.includes('bunnycdn.com')) {
|
||||||
await this.s3Service.delete(this.meta, param);
|
await this.s3Service.delete(this.meta, param);
|
||||||
} else {
|
} else {
|
||||||
await this.bunnyService.delete(this.meta, key);
|
await this.bunnyService.delete(this.meta, key);
|
||||||
|
|||||||
Reference in New Issue
Block a user