sdk.file_2.showuploadfileoptions
Home > @matterway/sdk > File_2 > ShowUploadFileOptions
File_2.ShowUploadFileOptions interface
The options to configure the file upload dialog.
Signature:
export interface ShowUploadFileOptions extends ShowMessageOptions
Extends: ShowMessageOptions
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
error? | TextProps['children'] | (Optional) The error message to display if the user tries to upload too many files. | |
fileLimit? | number | (Optional) The maximum number of files that can be uploaded. | |
fileUploadText? | TextProps['children'] | (Optional) The text of the upload file input. | |
fileUploadTitle | TextProps['children'] | The title of the file upload dialog. | |
loadingText? | string | (Optional) The text to display while the file is being uploaded. | |
uploadButton | TextProps['children'] | The label to use for the upload button. | |
validate? | (sdkFile: DroppedFile) => Promise<{ isValid: boolean; message: string; }> | (Optional) /** A function that takes a DroppedFile object and returns a promise that resolves to an object with isValid and message properties. If the isValid property is false , the message property should contain an error message. If the isValid property is true , the message property should be empty. If the validate function is not provided, all files will be considered valid. |