Files
artcraft/app/components/reusable/FileUploader/FileUploader.tsx
T
wilandwil 7cc6c019ce Api2.5 / Upload Audio (#502)
implement ApiManager ver of UploadAudio
- refactor UploadAudioDialogue to use endpoint
- cherrypicked MediaUploadApi from api-manager-5
- code cleanup as we tread through the files
- delete old request
- patched ApiManager to have a multipart fetch

Co-authored-by: wil <wil@storyteller.ai>
2024-06-20 12:37:46 -04:00

24 lines
575 B
TypeScript

import { FileUploader as DragDropFileUploader } from "react-drag-drop-files";
// Usage refer to https://github.com/KarimMokhtar/react-drag-drop-files
import { DragAndDropZone } from "./DragAndDropZone";
export const FileUploader = ({
file,
fileTypes,
handleChange,
}: {
file: File | undefined;
handleChange: (file: File) => void;
fileTypes: string[];
}) => (
<DragDropFileUploader
handleChange={handleChange}
name="file"
maxSize={50}
types={fileTypes}
>
<DragAndDropZone file={file} fileTypes={fileTypes} />
</DragDropFileUploader>
);