Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1x 1x | import { S3Client } from "@aws-sdk/client-s3";
import type { GpxR2Config } from "../config.js";
/** Единая точка создания S3-клиента для Cloudflare R2 (GPX и аватары делят бакет). */
export function createR2Client(r2: GpxR2Config): S3Client {
return new S3Client({
region: r2.region,
endpoint: r2.endpoint,
credentials: {
accessKeyId: r2.accessKeyId,
secretAccessKey: r2.secretAccessKey,
},
forcePathStyle: true,
});
}
|