Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ REMOTE_REPLIES_SCRAPE_MAX_REQUESTS=200
DRIVE_DISK=
STORAGE_URL_BASE=

# Custom emoji uploads storage:
# S3_EMOJI_IMPORT_BUCKET=
EMOJI_IMPORT_MAX_ARCHIVE_BYTES=52428800
EMOJI_IMPORT_MAX_ENTRY_COUNT=1000
EMOJI_IMPORT_MAX_EXTRACTED_BYTES=262144000

# If DRIVE_DISK is "fs":
# FS_STORAGE_PATH=
# EMOJI_IMPORT_FS_PATH=

# If DRIVE_DISK is "s3":
# AWS_ACCESS_KEY_ID=
Expand Down
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ To be released.
explicitly edited. Remote software may simplify the resulting HTML.
[[#679], [#680]]

- Added support for importing custom emojis from Misskey packed emoji ZIP
archives in the administration dashboard. Configure either
`EMOJI_IMPORT_FS_PATH` or `S3_EMOJI_IMPORT_BUCKET` to enable temporary
archive storage. The import limits default to 50 MiB
(`EMOJI_IMPORT_MAX_ARCHIVE_BYTES`), 1,000 entries
(`EMOJI_IMPORT_MAX_ENTRY_COUNT`), and 250 MiB extracted
(`EMOJI_IMPORT_MAX_EXTRACTED_BYTES`). [[#686], [#688] by nove-b\]

- Changed the HTTP server to avoid buffering entire uploads and incoming
activities before handling them behind a reverse proxy. Shutdown now waits
for active HTTP requests alongside background workers within the existing
Expand Down Expand Up @@ -211,6 +219,8 @@ To be released.
[#673]: https://github.com/fedify-dev/hollo/pull/673
[#679]: https://github.com/fedify-dev/hollo/issues/679
[#680]: https://github.com/fedify-dev/hollo/pull/680
[#686]: https://github.com/fedify-dev/hollo/issues/686
[#688]: https://github.com/fedify-dev/hollo/pull/688


Version 0.9.25
Expand Down
12 changes: 12 additions & 0 deletions changes.d/emoji-zip-import.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
links:
'#686': https://github.com/fedify-dev/hollo/issues/686
'#688': https://github.com/fedify-dev/hollo/pull/688
---
- Added support for importing custom emojis from Misskey packed emoji ZIP
archives in the administration dashboard. Configure either
`EMOJI_IMPORT_FS_PATH` or `S3_EMOJI_IMPORT_BUCKET` to enable temporary
archive storage. The import limits default to 50 MiB
(`EMOJI_IMPORT_MAX_ARCHIVE_BYTES`), 1,000 entries
(`EMOJI_IMPORT_MAX_ENTRY_COUNT`), and 250 MiB extracted
(`EMOJI_IMPORT_MAX_EXTRACTED_BYTES`). [[#686], [#688] by nove-b]
32 changes: 32 additions & 0 deletions docs/src/content/docs/install/env.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -509,3 +509,35 @@ The access key for S3-compatible object storage.
#### `AWS_SECRET_ACCESS_KEY` <Badge text="Required with S3 driver" variant="caution" />

The secret key for S3-compatible object storage.

### Custom emoji import archive storage

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The section documents the variables but not the condition that enables the feature. Add a sentence that the ZIP import page returns 503 Service Unavailable unless EMOJI_IMPORT_FS_PATH or S3_EMOJI_IMPORT_BUCKET is set.


#### `EMOJI_IMPORT_FS_PATH`

The local filesystem directory where custom emoji ZIP archives are stored
temporarily, e.g., `/var/lib/hollo/emoji-imports`.

This setting cannot be used together with `S3_EMOJI_IMPORT_BUCKET`.

#### `S3_EMOJI_IMPORT_BUCKET`

The name of the private S3-compatible object storage bucket where custom emoji
ZIP archives are stored temporarily, e.g., `hollo-emoji-imports`.

Do not enable a public development URL or custom domain for this bucket. This
setting cannot be used together with `EMOJI_IMPORT_FS_PATH`.
Comment thread
nove-b marked this conversation as resolved.
Resolved

#### `EMOJI_IMPORT_MAX_ARCHIVE_BYTES`

The maximum size of an uploaded custom emoji ZIP archive in bytes. Defaults to
50 MiB.

#### `EMOJI_IMPORT_MAX_ENTRY_COUNT`

The maximum number of entries in an imported custom emoji ZIP archive. Defaults
to 1,000 entries.

#### `EMOJI_IMPORT_MAX_EXTRACTED_BYTES`

The maximum total size of files extracted from an imported custom emoji ZIP
archive in bytes. Defaults to 250 MiB.
33 changes: 33 additions & 0 deletions docs/src/content/docs/ja/install/env.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -506,3 +506,36 @@ S3互換オブジェクトストレージのアクセスキー。
#### `AWS_SECRET_ACCESS_KEY` <Badge text="S3ドライバで必須" variant="caution" />

S3互換オブジェクトストレージのシークレットキー。

### カスタム絵文字インポート用アーカイブストレージ

#### `EMOJI_IMPORT_FS_PATH`

カスタム絵文字の ZIP archive を一時的に保存する、ローカルファイルシステム上の
ディレクトリ。例:`/var/lib/hollo/emoji-imports`。

`S3_EMOJI_IMPORT_BUCKET` と同時に設定することはできません。


#### `S3_EMOJI_IMPORT_BUCKET`

カスタム絵文字の ZIP archive を一時的に保存する、非公開の S3 互換
オブジェクトストレージ bucket の名前。例:`hollo-emoji-imports`。

この bucket では public development URL や custom domain を有効にしないでください。
`EMOJI_IMPORT_FS_PATH` と同時に設定することはできません。

#### `EMOJI_IMPORT_MAX_ARCHIVE_BYTES`

アップロードするカスタム絵文字 ZIP アーカイブの最大サイズ(バイト単位)。
デフォルトは 50 MiB です。

#### `EMOJI_IMPORT_MAX_ENTRY_COUNT`

インポートするカスタム絵文字 ZIP アーカイブに含められるエントリーの最大数。
デフォルトは 1,000 エントリーです。

#### `EMOJI_IMPORT_MAX_EXTRACTED_BYTES`

インポートするカスタム絵文字 ZIP アーカイブから展開されるファイルの合計最大サイズ
(バイト単位)。デフォルトは 250 MiB です。
32 changes: 32 additions & 0 deletions docs/src/content/docs/ko/install/env.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -497,3 +497,35 @@ S3 호환 오브젝트 스토리지 액세스 키.
#### `AWS_SECRET_ACCESS_KEY` <Badge text="S3 드라이버에서 필수" variant="caution" />

S3 호환 오브젝트 스토리지 비밀 키.

### 커스텀 이모지 가져오기 아카이브 저장소

#### `EMOJI_IMPORT_FS_PATH`

커스텀 이모지 ZIP 아카이브를 임시로 저장할 로컬 파일 시스템 디렉터리입니다. 예:
`/var/lib/hollo/emoji-imports`.

이 설정은 `S3_EMOJI_IMPORT_BUCKET`과 함께 사용할 수 없습니다.

#### `S3_EMOJI_IMPORT_BUCKET`

커스텀 이모지 ZIP 아카이브를 임시로 저장할 비공개 S3 호환 오브젝트 스토리지
버킷의 이름입니다. 예: `hollo-emoji-imports`.

이 버킷에서는 공개 개발 URL이나 사용자 지정 도메인을 활성화하지 마세요. 이 설정은
`EMOJI_IMPORT_FS_PATH`와 함께 사용할 수 없습니다.

#### `EMOJI_IMPORT_MAX_ARCHIVE_BYTES`

업로드하는 커스텀 이모지 ZIP 아카이브의 최대 크기(바이트 단위)입니다. 기본값은
50 MiB입니다.

#### `EMOJI_IMPORT_MAX_ENTRY_COUNT`

가져오는 커스텀 이모지 ZIP 아카이브에 포함할 수 있는 최대 항목 수입니다. 기본값은
1,000개 항목입니다.

#### `EMOJI_IMPORT_MAX_EXTRACTED_BYTES`

가져오는 커스텀 이모지 ZIP 아카이브에서 추출되는 파일의 총 최대 크기(바이트
단위)입니다. 기본값은 250 MiB입니다.
30 changes: 30 additions & 0 deletions docs/src/content/docs/zh-cn/install/env.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -452,3 +452,33 @@ S3兼容对象存储的访问密钥ID。
#### `AWS_SECRET_ACCESS_KEY` <Badge text="S3 驱动程序必填" variant="caution" />

S3兼容对象存储的访问密钥。

### 自定义表情符号导入归档存储

#### `EMOJI_IMPORT_FS_PATH`

临时存储自定义表情符号 ZIP 归档的本地文件系统目录。例如:
`/var/lib/hollo/emoji-imports`。

此设置不能与 `S3_EMOJI_IMPORT_BUCKET` 同时使用。

#### `S3_EMOJI_IMPORT_BUCKET`

临时存储自定义表情符号 ZIP 归档的私有 S3 兼容对象存储桶名称。例如:
`hollo-emoji-imports`。

请勿为此桶启用公开开发 URL 或自定义域名。此设置不能与
`EMOJI_IMPORT_FS_PATH` 同时使用。

#### `EMOJI_IMPORT_MAX_ARCHIVE_BYTES`

上传的自定义表情符号 ZIP 归档的最大大小,单位为字节。默认值为 50 MiB。

#### `EMOJI_IMPORT_MAX_ENTRY_COUNT`

导入的自定义表情符号 ZIP 归档中允许的最大条目数。默认值为 1,000 个条目。

#### `EMOJI_IMPORT_MAX_EXTRACTED_BYTES`

从导入的自定义表情符号 ZIP 归档中提取的文件总大小上限,单位为字节。
默认值为 250 MiB。
30 changes: 30 additions & 0 deletions docs/src/content/docs/zh-tw/install/env.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -452,3 +452,33 @@ S3 相容物件儲存的存取金鑰 ID。
#### `AWS_SECRET_ACCESS_KEY` <Badge text="S3 驅動程式必填" variant="caution" />

S3 相容物件儲存的存取金鑰。

### 自訂表情符號匯入封存儲存

#### `EMOJI_IMPORT_FS_PATH`

暫時儲存自訂表情符號 ZIP 封存檔的本地檔案系統目錄。例如:
`/var/lib/hollo/emoji-imports`。

此設定不能與 `S3_EMOJI_IMPORT_BUCKET` 同時使用。

#### `S3_EMOJI_IMPORT_BUCKET`

暫時儲存自訂表情符號 ZIP 封存檔的私有 S3 相容物件儲存桶名稱。例如:
`hollo-emoji-imports`。

請勿為此儲存桶啟用公開開發 URL 或自訂網域。此設定不能與
`EMOJI_IMPORT_FS_PATH` 同時使用。

#### `EMOJI_IMPORT_MAX_ARCHIVE_BYTES`

上傳的自訂表情符號 ZIP 封存檔最大大小,單位為位元組。預設值為 50 MiB。

#### `EMOJI_IMPORT_MAX_ENTRY_COUNT`

匯入的自訂表情符號 ZIP 封存檔允許的最大項目數。預設值為 1,000 個項目。

#### `EMOJI_IMPORT_MAX_EXTRACTED_BYTES`

從匯入的自訂表情符號 ZIP 封存檔擷取的檔案總大小上限,單位為位元組。
預設值為 250 MiB。
12 changes: 12 additions & 0 deletions drizzle/20261028021042_custom-emoji-import-jobs/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CREATE TYPE "import_custom_emoji_status_enum" AS ENUM('pending', 'processing', 'completed', 'failed');--> statement-breakpoint
CREATE TABLE "custom_emoji_import_jobs" (
"id" uuid PRIMARY KEY,
"archive_key" text NOT NULL,
"status" "import_custom_emoji_status_enum" DEFAULT 'pending'::"import_custom_emoji_status_enum" NOT NULL,
"imported_count" integer DEFAULT 0 NOT NULL,
"skipped_count" integer DEFAULT 0 NOT NULL,
"failed_count" integer DEFAULT 0 NOT NULL,
"error" text,
"created" timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
"completed" timestamp with time zone
);
Loading
Loading