Pular para o conteúdo principal

DropFile

Import

import { DropFile } from '@resultadosdigitais/tangram-components'

Properties

accept

Typestring
Default''

Description

Sets allowed file formats.

accept=".png, .jpg"

acceptMessage

Typestring | node
DefaultACCEPT_MESSAGE

Description

Sets a custom accept message.

autoUpload

Typebool
Defaultfalse

Description

Indicates that the file should be uploaded right after user select a valid one.

browseButtonText

Typestring | node
DefaultBROWSE_BUTTON_TEXT

Description

Sets a custom text for browse button.

disabled

Typebool
Defaultfalse

Description

Sets if is disabled.

initialFile

Typeobject | enum
Defaultnull

Description

Object containing at least name attribute.

invalidFileErrorMessage

Typestring | node
DefaultINVALID_FILE_ERROR_MESSAGE

Description

Sets a custom invalid file error message.

onChange

Typefunc
Default() => {}

Description

Sets a custom listener to be executed when selected file changes.

onUpload

Typefunc
Default() => {}

Description

Sets a custom listener to be executed when file is valid and autoUpload has been set as true.

onUploadSuccess

Typefunc
Default() => {}

Description

Sets a custom listener to be executed on upload success.

onUploadError

Typefunc
Default() => {}

Description

Sets a custom listener to be executed on upload error.

progress

Typenumber
Default0

Description

Sets progress shown by progress bar.

retryButtonText

Typestring | node
DefaultRETRY_BUTTON_TEXT

Description

Sets a custom text for retry button.

selectionFileMessage

Typestring | node
Default

Description

Sets a custom selection file message.

successMessage

Typestring | node
DefaultSUCCESS_MESSAGE

Description

Sets a custom success message.

uploadErrorMessage

Typestring | node
DefaultUPLOAD_ERROR_MESSAGE

Description

Sets a custom upload error message.

uploadProcessingMessage

Typestring | node
DefaultUPLOAD_PROCESSING_MESSAGE

Description

Sets a custom message to be shown during the upload processing.

Feedback

Para reportar algum problema ou sugerir alterações, use nosso formulário de melhorias ou, se preferir, abra uma issue no nosso Github.