chore: add deployment config

This commit is contained in:
ParkWonYeop
2025-12-27 15:45:12 +09:00
parent 87405e897e
commit 906cad6952
27 changed files with 12273 additions and 1543 deletions

View File

@@ -1,18 +1,13 @@
import { http } from './http';
import { ApiResponse } from '@/types';
// 이미지 업로드 (POST /api/admin/images)
export const uploadImage = async (file: File) => {
const formData = new FormData();
formData.append('image', file);
// 👇 헤더에 Content-Type을 'multipart/form-data'로 명시하거나,
// 아예 지워서(undefined) 브라우저가 알아서 boundary를 붙이게 해야 합니다.
// 가장 안전한 방법은 'Content-Type': 'multipart/form-data'를 명시하는 것입니다.
const response = await http.post<ApiResponse<string>>('/api/admin/images', formData, {
headers: {
'Content-Type': 'multipart/form-data', // 👈 여기! 이거 추가하면 해결됩니다.
'Content-Type': 'multipart/form-data',
},
});
return response.data;