조사사업 등록·결과 업로드 및 관로·맨홀 종합집계 화면 구현

This commit is contained in:
kiminchan
2026-07-23 17:06:01 +09:00
parent ec60a05b01
commit 477426c384
27 changed files with 3376 additions and 11 deletions
@@ -21,6 +21,7 @@ type UploadOptions = {
handleProgress?: (percentage: string) => void;
handleSuccess?: (upload: Upload) => void;
handleResponse?: (res: HttpResponse) => void;
handleError?: (error: Error) => void;
};
export const handleUpload = (files: FileList, options?: UploadOptions) => {
@@ -43,6 +44,7 @@ export const handleUpload = (files: FileList, options?: UploadOptions) => {
metadata,
onError(error) {
console.error(`Failed because: ${error}`);
options?.handleError?.(error);
},
onProgress(bytesUploaded, bytesTotal) {
const percentage = ((bytesUploaded / bytesTotal) * 100).toFixed(2);