feat(member): 회원 썸네일 업로드를 작가 미디어와 분리
회원 아바타 자산을 전용 경로로 분리해 작가용 미디어 목록과 섞이지 않게 하고, 설정 화면에서 파일 업로드로 바로 반영할 수 있게 했다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -252,12 +252,13 @@ const getMediaUsage = (url, posts, pages) => {
|
||||
*/
|
||||
export const listMediaItems = async () => {
|
||||
const items = await readMediaDirectory(uploadRoot)
|
||||
const publicAdminItems = items.filter((item) => !item.url.startsWith('/uploads/members/avatars/'))
|
||||
const metadataMap = await getMediaMetadataMap()
|
||||
const [posts, pages] = await Promise.all([
|
||||
listAdminPosts(),
|
||||
listPages()
|
||||
])
|
||||
const itemsWithUsage = items.map((item) => ({
|
||||
const itemsWithUsage = publicAdminItems.map((item) => ({
|
||||
...item,
|
||||
category: metadataMap[item.url]?.category || item.category,
|
||||
usage: getMediaUsage(item.url, posts, pages)
|
||||
|
||||
Reference in New Issue
Block a user