chore: attachment 인터페이스 수정

This commit is contained in:
2025-05-14 13:55:04 +09:00
parent d9a4e365ba
commit b0235808f8
12 changed files with 57 additions and 46 deletions
@@ -47,7 +47,7 @@ function WithPreviewFileUploader<T extends PostFormData | PostUpdateFormData>({
if (atflId) {
let imageUrl = "";
if (bbsInfo?.bbsTypeCd === "BBSIMAGE") {
imageUrl = await AttachmentApi.getImageUrl(atflId);
imageUrl = await AttachmentApi.getImageUrlByAtflId(atflId);
}
if (bbsInfo?.bbsTypeCd === "BBSMOVIE") {
imageUrl = await AttachmentApi.getMovieThumbnailUrl(atflId);
@@ -85,7 +85,7 @@ function WithPreviewFileUploader<T extends PostFormData | PostUpdateFormData>({
useEffect(() => {
if (!attachmentData || attachmentData.length === 0) return;
(async () => {
const imageUrl = await AttachmentApi.getImageUrl(
const imageUrl = await AttachmentApi.getImageUrlByAtflId(
attachmentData[0]?.atflId as string,
);
setThumbnailUrl(imageUrl);
@@ -95,7 +95,7 @@ function WithPreviewFileUploader<T extends PostFormData | PostUpdateFormData>({
return (
<FileUploader
id="atflCd"
className="!h-auto !max-w-none flex-col !items-start gap-4"
className="!h-auto !max-w-none flex-col !items-start gap-4 [&_.file-uploader-label]:h-[3.2rem]"
accept={fileAccept(bbsInfo?.bbsTypeCd as BbsType)}
onUpload={onUpload}
customPreview={