썸네일 미참조 삭제 허용·원본명 업로드·미디어 검색 정리(v0.0.91)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { rm } from 'node:fs/promises'
|
||||
import { join, relative } from 'node:path'
|
||||
import { createError } from 'h3'
|
||||
import { getPostgresClient } from '../repositories/postgres-client'
|
||||
@@ -41,7 +40,7 @@ export const resolveMemberAvatarPath = (url) => {
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원 썸네일 파일과 메타데이터를 정리한다.
|
||||
* 프로필에서 썸네일 URL을 끊을 때 `media_metadata` 행만 제거한다. 디스크 파일은 유지해 관리자 미디어(썸네일 탭)에서 미사용 자산으로 확인·삭제할 수 있게 한다.
|
||||
* @param {string} url - 정리 대상 URL
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@@ -50,9 +49,6 @@ export const removeManagedAvatarAsset = async (url) => {
|
||||
return
|
||||
}
|
||||
|
||||
const filePath = resolveMemberAvatarPath(url)
|
||||
await rm(filePath, { force: true })
|
||||
|
||||
const sql = getPostgresClient()
|
||||
if (!sql) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user