파일업로드 수정
iipbs_sn / build (push) Waiting to run

This commit is contained in:
yschoi
2025-05-23 13:43:07 +09:00
parent ab00dc1e86
commit 26c28c53db
+18 -21
View File
@@ -52,29 +52,26 @@ const FileUploadForm = ({ title, onSubmit }: { title: string, onSubmit:(files:Fi
/>
<div className='flex ml-5 items-center'>
<div className="w-[80px] mr-4">
<FileUploader
id="atflCd"
className="!h-auto !max-w-none flex-col !items-start"
accept=".jpeg,.jpg,.png"
onUpload={(e) => {
const selectedFiles = e.target.files;
if (!selectedFiles) return;
<FileUploader
id="atflCd"
className="!h-auto !max-w-none flex-col !items-start"
accept=".jpeg,.jpg,.png"
onUpload={(e) => {
const selectedFiles = e.target.files;
if (!selectedFiles) return;
const fileArray = Array.from(selectedFiles);
if(!fileArray){
setFiles(fileArray);
}
if (fileArray[0]) {
handleUpload(selectedFiles, {
handleUploadStart: setUpload,
handleSuccess: setUpload,
handleResponse: handleUploadResponse(fileArray[0]),
});
}
setFiles(selectedFiles);
if (selectedFiles[0]) {
handleUpload(selectedFiles, {
handleUploadStart: setUpload,
handleSuccess: setUpload,
handleResponse: handleUploadResponse(selectedFiles[0]),
});
}
}}
customPreview={<></>}
/>
}}
customPreview={<></>}
/>
</div>
<Button
className="px-4 py-2 bg-blue-600 text-white rounded-sm text-sm font-medium hover:bg-blue-700"