keep trying

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-07-12 12:53:53 +08:00
parent ea3e82e54c
commit d0a64a8043
8 changed files with 55 additions and 80 deletions
+12 -3
View File
@@ -6,7 +6,14 @@
// deleteFile(key)
//
// Required .env vars:
// S3_ENDPOINT – http://127.0.0.1:3900 (internal — always used for uploads/deletes)
// S3_ENDPOINT – address this backend uses for uploads/deletes.
// http://127.0.0.1:3900 when co-located with Garage.
// Otherwise (backend runs on a different machine than
// Garage) point this at a network-reachable address that
// terminates on Garage — e.g. the same tunneled domain as
// S3_PUBLIC_URL, since garage-anon-proxy re-signs any
// non-presigned request with real credentials before
// forwarding. Never leave this blank.
// S3_REGION – garage
// S3_ACCESS_KEY
// S3_SECRET_KEY
@@ -28,8 +35,10 @@ const credentials = {
};
// Internal client — uploads, deletes, direct streams from the server itself.
// Always targets S3_ENDPOINT: these calls originate from this machine, so the
// internal address is the correct (and only) one to use.
// Always targets S3_ENDPOINT. When this backend is co-located with Garage,
// that's a local address; when it isn't, S3_ENDPOINT must instead be a
// network-reachable address that reaches Garage (e.g. the tunneled proxy
// domain) — see the .env docs above. Do not assume co-location here.
const s3 = new S3Client({
endpoint: process.env.S3_ENDPOINT,
region: process.env.S3_REGION || "garage",