upd: add logger, check hostname, add catch

This commit is contained in:
Marie 2025-05-06 01:02:27 +02:00
parent 381ea14049
commit 621f2e2ee4
No known key found for this signature in database
GPG key ID: 7ADF6C9CD9A28555
2 changed files with 23 additions and 3 deletions

View file

@ -408,7 +408,11 @@ export class DriveService {
if (this.meta.objectStorageSetPublicRead) params.ACL = 'public-read';
if (this.bunnyService.usingBunnyCDN(this.meta)) {
await this.bunnyService.upload(this.meta, key, stream);
await this.bunnyService.upload(this.meta, key, stream).catch(
err => {
this.registerLogger.error(`Upload Failed: key = ${key}, filename = ${filename}`, err);
},
);
} else {
await this.s3Service.upload(this.meta, params)
.then(