synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
29 lines • 1.43 kB
TypeScript
import { UploaderState } from '@/utils/hooks/useUploadFileEntity/useUploadFiles';
export type BasicFileHandleUploadProps = {
/**
* Whether to allow uploading multiple files.
* Currently, only single file upload is supported by this UI component.
*/
allowMultipleUpload: false;
/**
* Whether to disable "drag-and-drop to upload" functionality.
* Currently, drag-and-drop cannot be enabled.
*/
disableDragAndDrop: true;
/** Callback that is invoked when the state of the uploader changes */
onStateChange?: (state: UploaderState) => void;
/** Callback that is invoked when component is ready to upload */
onUploadReady?: () => void;
/** Callback that is invoked when an individual upload is complete */
onFileUploadComplete?: (fileHandleIds: string) => void;
};
export type FileUploadHandle = {
/** Programmatically add files to the upload (e.g. on drag & drop) */
handleUploads: (fileList: ArrayLike<File>) => void;
};
/**
* BasicFileHandleUpload is a component that supports uploading a file to the default Synapse S3 bucket and creating a
* file handle, which can only be accessed the system itself and the user uploading the file.
*/
export declare const BasicFileHandleUpload: import("react").ForwardRefExoticComponent<BasicFileHandleUploadProps & import("react").RefAttributes<FileUploadHandle>>;
//# sourceMappingURL=BasicFileHandleUpload.d.ts.map