Bỏ qua để đến nội dung

Nhà cung cấp S3

Dùng guide này để cấu hình các provider tương thích S3 phổ biến.

Setup public bucket hoặc CDN-backed thường dùng:

s3:
endpoint: "https://s3.amazonaws.com"
region: "us-east-1"
bucket: "my-bucket"
access_key: "..."
secret_key: "..."
path_style: false
acl: "public-read"
use_presigned_url: false
public_url_base: "https://cdn.example.com"

Nếu không đặt public_url_base, IAUP dùng URL object từ S3 SDK.

R2 thường dùng path-style access và region auto:

s3:
endpoint: "https://<accountid>.r2.cloudflarestorage.com"
region: "auto"
bucket: "my-bucket"
access_key: "..."
secret_key: "..."
path_style: true
acl: "private"
use_presigned_url: false
public_url_base: "https://packs.example.com"

R2 có thể bỏ qua ACL. Nên dùng public custom domain hoặc presigned URL tùy thiết kế bucket.

MinIO local hoặc self-host thường cần path-style URL:

s3:
endpoint: "https://minio.example.com"
region: "us-east-1"
bucket: "itemsadder"
access_key: "..."
secret_key: "..."
path_style: true
acl: "public-read"
use_presigned_url: false
public_url_base: "https://cdn.example.com/itemsadder"

Nếu client phải tải trực tiếp từ MinIO, xác nhận endpoint reachable từ máy player, không chỉ từ Minecraft server.

s3:
use_presigned_url: true
presigned_expiry_seconds: 86400
acl: "private"

Với presigned URL, public_url_base bị ignore.

Dùng expiry đủ dài để player join sau khi URL được ghi. Expiry quá ngắn có thể làm download resource pack thất bại.

s3:
path_scheme: "itemsadder/{uid}/{date}/{file}"

Placeholder hỗ trợ:

PlaceholderÝ nghĩa
{uid}IAUP UID persistent từ config.
{file}Tên file đầy đủ, ví dụ generated.zip.
{name}Tên file không có extension.
{ext}Extension không có dấu chấm.
{date}Ngày hiện tại dạng yyyyMMdd.
{ts}Timestamp millisecond hiện tại.

Leading slash bị xóa khỏi object key cuối cùng.