mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 08:47:40 -05:00
ability to use a different public URL for S3
This commit is contained in:
@@ -21,7 +21,7 @@ var s3_endpoint = process.env['S3_ENDPOINT'] != null ? process.env['S3_ENDPOINT'
|
||||
var s3_region = process.env['S3_REGION'] != null ? process.env['S3_REGION'] : 'us-west-1';
|
||||
var s3_bucket = process.env['S3_BUCKET'] != null ? process.env['S3_BUCKET'] : 'openmhz-west';
|
||||
var s3_profile = process.env['S3_PROFILE'] != null ? process.env['S3_PROFILE'] : 'wasabi-account';
|
||||
|
||||
var s3_public_url = process.env['S3_PUBLIC_URL'] != null ? process.env['S3_PUBLIC_URL'] : s3_endpoint + "/" + s3_bucket;
|
||||
|
||||
const client = new S3Client({
|
||||
requestHandler: new NodeHttpHandler({
|
||||
@@ -165,7 +165,7 @@ exports.upload = async function (req, res, next) {
|
||||
|
||||
var endpoint = s3_endpoint;
|
||||
var bucket = s3_bucket;
|
||||
var url = s3_endpoint + "/" + s3_bucket + "/" + object_key;
|
||||
var url = s3_public_url + "/" + object_key;
|
||||
|
||||
var call = new Call({
|
||||
shortName: shortName,
|
||||
|
||||
@@ -270,7 +270,7 @@ io.sockets.on('connection', function (client) {
|
||||
|
||||
if (typeof clients[client.id] === "undefined") {
|
||||
console.error("How can it be undefined here!!");
|
||||
console.error(clients[client.id]);
|
||||
console.error(client.id);
|
||||
return;
|
||||
}
|
||||
if (group) {
|
||||
|
||||
@@ -77,6 +77,7 @@ services:
|
||||
- S3_BUCKET
|
||||
- S3_PROFILE
|
||||
- S3_REGION
|
||||
- S3_PUBLIC_URL
|
||||
- OTEL_SERVICE_NAME
|
||||
- HONEYCOMB_API_KEY
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user