feat: integrate S3 storage adapter and update file upload functionality

This commit is contained in:
2026-04-10 22:54:46 -03:00
parent 98515550ca
commit 4b1bd056fc
14 changed files with 319 additions and 309 deletions

View File

@@ -21,7 +21,7 @@ import React, { useCallback } from 'react';
export interface FileUploadFieldProps {
file: File | null;
onFileChange: (file: File | null) => void;
onFileChange: (file: File | null) => Promise<void>;
accept?: string;
validate?: (file: File) => string | null;
onFileReject?: (file: File, message: string) => void;
@@ -45,7 +45,8 @@ export const FileUploadField: React.FC<FileUploadFieldProps> = ({
const handleAccept = useCallback(
(files: File[]) => {
const accepted = files[0];
if (accepted) onFileChange(accepted);
if (!accepted) return;
onFileChange(accepted).then(() => {});
},
[onFileChange]
);