http://localhost:3000https://btms-server.onrender.com엑셀 업로드 시 (multipart/form-data)
const formData = new FormData();
formData.append("excel", fileInput.files[0]); // 파일
formData.append("companyId", 1); // 회사 ID 필수!
await axios.post("/api/templates/upload", formData);
계약서 다운로드 시 (Blob)
// responseType: 'blob' 설정이 반드시 필요합니다!
const res = await axios.post("/api/contracts/create", data, {
responseType: 'blob'
});
// 다운로드 링크 생성 트릭
const url = window.URL.createObjectURL(new Blob([res.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', `${data.name}_근로계약서.xlsx`);
document.body.appendChild(link);
link.click();
네, 지금까지 개발된 **"본사-현장 간 근로계약 및 인사정보 통합 관리 시스템(BTMS)"**의 내용을 바탕으로 정리한 최신 문서입니다.