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

Cấu hình IAUP

File config:

plugins/ItemsAdderUploadPlus/config.yml
global:
uid: "93266666-9320-7451-0239-66662fa66666"
output_file: "plugins/ItemsAdder/output/generated.zip"
update_itemsadder_config: true
auto_iareload_after_manual_upload: false
auto_iareload_after_auto_upload: false
itemsadder_config_path: ""
auto_upload_on_pack: true
cache_bust:
enabled: true
param: "v"
mode: "timestamp"
s3:
endpoint: "https://s3.amazonaws.com"
region: "us-east-1"
bucket: "my-bucket"
access_key: ""
secret_key: ""
session_token: ""
path_scheme: "itemsadder/{uid}/{file}"
path_style: false
acl: "public-read"
use_presigned_url: false
presigned_expiry_seconds: 3600
public_url_base: ""
KeyBắt buộcGhi chú
s3.bucketyesKhông được rỗng.
s3.access_keyyesKhông được rỗng.
s3.secret_keyyesKhông được rỗng.
s3.region hoặc s3.endpointyesÍt nhất một key phải được đặt.

Giá trị bắt buộc invalid sẽ chặn enable hoặc reload.

Unique ID persistent dùng trong path_scheme.

Nếu rỗng, IAUP generate UUID và ghi lại vào config.

Path pack zip để upload.

Mặc định:

plugins/ItemsAdder/output/generated.zip

Khi true, IAUP ghi download URL cuối cùng vào:

resource-pack.hosting.external-host.url

Khi true, /iaup upload thành công dispatch:

/iareload

Chỉ xảy ra nếu cập nhật ItemsAdder config thành công.

Tương tự trên, nhưng cho upload trigger bởi ItemsAdder pack-compressed event.

Path override tùy chọn cho ItemsAdder config.

Giá trị rỗng mặc định nghĩa là IAUP dùng data folder của plugin ItemsAdder đã cài.

Khi true, IAUP lắng nghe ItemsAdder pack compressed event và upload tự động.

KeyKiểuMặc địnhÝ nghĩa
enabledbooleantrueThêm cache-bust query param.
paramstringvTên query parameter.
modestringtimestamptimestamp hoặc uuid.

Custom S3 endpoint. Bắt buộc cho provider tương thích S3 như R2 hoặc MinIO.

AWS có thể dùng:

https://s3.amazonaws.com

AWS region hoặc region theo provider. R2 thường dùng:

auto

Temporary credential token tùy chọn. Nếu đặt, IAUP dùng session credentials.

Template object key.

Mặc định:

itemsadder/{uid}/{file}

Placeholder hỗ trợ:

{uid} {file} {name} {ext} {date} {ts}

Bật path-style access cho endpoint mode.

Dùng true cho nhiều provider tương thích S3.

Giá trị phổ biến được hỗ trợ:

  • public-read
  • private
  • bucket-owner-full-control
  • bucket-owner-read
  • public-read-write
  • none

none tắt canned ACL khi upload.

Khi true, IAUP tạo signed GET URL sau upload. public_url_base bị ignore.

Expiry cho presigned URL. Giá trị <= 0 khiến IAUP không thêm expiration rõ ràng.

Public base URL cho CDN/custom domain mode.

Ví dụ:

s3:
public_url_base: "https://cdn.example.com"

URL cuối:

https://cdn.example.com/<objectKey>