release: v1.4.1 — 上传策略设置、保留原图与上传 tagNames
GitHub Release / release (push) Canceled after 0s
Publish Docker image / build (linux/amd64, ubuntu-latest, amd64) (push) Canceled after 0s
Publish Docker image / build (linux/arm64, ubuntu-24.04-arm, arm64) (push) Canceled after 0s
Publish Docker image / merge (push) Canceled after 0s
ci / ci (22, ubuntu-latest) (push) Canceled after 0s

管理员可在设置页配置上传大小、格式、限流与保留原图;上传 API 支持按标签名称打标。
This commit is contained in:
O96u committed 2026-09-16 10:03:05 +08:00
1 parent d0eb364645
commit 6cc4f27f7d
25 files changed
+1354 -172

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
import { getStorageBackendRow } from './storage-backends'
import { ALLOWED_MIME_TYPES } from './constants'
import { getAllowedMimeTypesList } from './upload-policy'
import { parseTagIdsParam, type TagFilterInput } from './tags'
export function readBackendIdQuery(
@@ -15,7 +15,7 @@ export function readContentTypeQuery(
): string | undefined | null {
const raw = typeof query.contentType === 'string' ? query.contentType.trim() : ''
if (!raw || raw === 'all') return undefined
if (!(ALLOWED_MIME_TYPES as readonly string[]).includes(raw)) return null
if (!(getAllowedMimeTypesList() as readonly string[]).includes(raw)) return null
return raw
}