관리자 업로드 제한 설정 추가

This commit is contained in:
2026-07-01 17:58:30 +09:00
parent 129b68b939
commit e5d3eac2fd
17 changed files with 308 additions and 20 deletions

View File

@@ -29,6 +29,10 @@ import {
DEFAULT_TAG_POST_LIST_PAGE_SIZE,
normalizeDisplayCount
} from '../../lib/display-count-settings.js'
import {
normalizeUploadMaxFileCount,
normalizeUploadMaxTotalSize
} from '../../lib/upload-size-limit.js'
import { normalizeSocialLinks } from '../../lib/social-links.js'
import {
createPostBodyThumbnailsForContent,
@@ -157,6 +161,8 @@ const mapSiteSettingsRow = (row) => ({
tagPostListPageSize: normalizeDisplayCount(row.tag_post_list_page_size, DEFAULT_TAG_POST_LIST_PAGE_SIZE),
featuredPostLimit: normalizeDisplayCount(row.featured_post_limit, DEFAULT_FEATURED_POST_LIMIT),
pageSectionItemLimit: normalizeDisplayCount(row.page_section_item_limit, DEFAULT_PAGE_SECTION_ITEM_LIMIT),
uploadMaxFileCount: normalizeUploadMaxFileCount(row.upload_max_file_count),
uploadMaxTotalSize: normalizeUploadMaxTotalSize(row.upload_max_total_size),
homeCoverImageUrl: row.home_cover_image_url || '',
homeCoverDarkImageUrl: row.home_cover_dark_image_url || '',
homeCoverTitle: row.home_cover_title || '',
@@ -1463,6 +1469,8 @@ export const updateSiteSettings = async (input) => {
tag_post_list_page_size,
featured_post_limit,
page_section_item_limit,
upload_max_file_count,
upload_max_total_size,
home_cover_image_url,
home_cover_dark_image_url,
home_cover_title,
@@ -1503,6 +1511,8 @@ export const updateSiteSettings = async (input) => {
${normalizeDisplayCount(input.tagPostListPageSize, DEFAULT_TAG_POST_LIST_PAGE_SIZE)},
${normalizeDisplayCount(input.featuredPostLimit, DEFAULT_FEATURED_POST_LIMIT)},
${normalizeDisplayCount(input.pageSectionItemLimit, DEFAULT_PAGE_SECTION_ITEM_LIMIT)},
${normalizeUploadMaxFileCount(input.uploadMaxFileCount)},
${normalizeUploadMaxTotalSize(input.uploadMaxTotalSize)},
${input.homeCoverImageUrl || ''},
${input.homeCoverDarkImageUrl || ''},
${input.homeCoverTitle || ''},
@@ -1543,6 +1553,8 @@ export const updateSiteSettings = async (input) => {
tag_post_list_page_size = EXCLUDED.tag_post_list_page_size,
featured_post_limit = EXCLUDED.featured_post_limit,
page_section_item_limit = EXCLUDED.page_section_item_limit,
upload_max_file_count = EXCLUDED.upload_max_file_count,
upload_max_total_size = EXCLUDED.upload_max_total_size,
home_cover_image_url = EXCLUDED.home_cover_image_url,
home_cover_dark_image_url = EXCLUDED.home_cover_dark_image_url,
home_cover_title = EXCLUDED.home_cover_title,