We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddd4cfe commit a659241Copy full SHA for a659241
server/src/file/file.service.ts
@@ -168,7 +168,11 @@ export class FileService {
168
169
private getPublicFileUrl(key: string, bucket: string) {
170
const region = this.region;
171
- return `https://${bucket}.s3.${region}.backblazeb2.com/${key}`; // TODO: make possible to use custom domain
+ if (this.S3_ENDPOINT.includes('localhost')) {
172
+ // minio url
173
+ return `${this.S3_ENDPOINT}/${bucket}/${key}`;
174
+ } // production blackblaze url
175
+ else return `https://${bucket}.s3.${region}.backblazeb2.com/${key}`; // TODO: make possible to use custom domain
176
}
177
178
public async deleteSong(nbsFileUrl: string) {
0 commit comments