diff --git a/src/Adapters/Files/S3Adapter.js b/src/Adapters/Files/S3Adapter.js index b33b66f1..dd6c8d0d 100644 --- a/src/Adapters/Files/S3Adapter.js +++ b/src/Adapters/Files/S3Adapter.js @@ -88,7 +88,7 @@ export class S3Adapter extends FilesAdapter { // The location is the direct S3 link if the option is set, otherwise we serve the file through parse-server getFileLocation(config, filename) { if (this._directAccess) { - return ('https://' + this.bucket + '._s3Client.amazonaws.com' + '/' + this._bucketPrefix + filename); + return `https://${this._bucket}.s3.amazonaws.com/${this._bucketPrefix + filename}`; } return (config.mount + '/files/' + config.applicationId + '/' + encodeURIComponent(filename)); }