Fix invalid s3 files url.

This commit is contained in:
Nikita Lutsenko
2016-02-12 20:07:42 -08:00
parent cf7202f80a
commit 2570899272

View File

@@ -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));
}