diff --git a/app/sync/S3Syncer.mjs b/app/sync/S3Syncer.mjs index 70e375f..ca98fad 100644 --- a/app/sync/S3Syncer.mjs +++ b/app/sync/S3Syncer.mjs @@ -12,7 +12,9 @@ export default class S3Syncer this.syncClient.sync(this.publicBucket, `${this.localPath}/dist`, { filters: this.filters, }), - this.syncClient.sync(this.privateBucket, `${this.localPath}/storage`), + this.syncClient.sync(this.privateBucket, `${this.localPath}/storage`, { + filters: this.privateFilters + }), ]); } @@ -30,7 +32,9 @@ export default class S3Syncer : undefined, }), }), - this.syncClient.sync(`${this.localPath}/storage`, this.privateBucket), + this.syncClient.sync(`${this.localPath}/storage`, this.privateBucket, { + filters: this.privateFilters, + }), ]); } @@ -72,6 +76,12 @@ export default class S3Syncer ]; } + get privateFilters() { + return [ + { exclude: (key) => key.startsWith('archive/') }, + ]; + } + log(message) { console.log(`[S3] ${message}`); }