ability to use a different public URL for S3

This commit is contained in:
Luke Berndt
2024-08-19 17:09:09 -04:00
parent 0cc8caeba0
commit e3e14a229a
3 changed files with 4 additions and 3 deletions

View File

@@ -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,

View File

@@ -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) {

View File

@@ -77,6 +77,7 @@ services:
- S3_BUCKET
- S3_PROFILE
- S3_REGION
- S3_PUBLIC_URL
- OTEL_SERVICE_NAME
- HONEYCOMB_API_KEY
volumes: