File Input

<sw-file-input>

n/a
The sw-file-input component can be used wherever a file input is needed.

Usage

<sw-file-input
    v-model="selectedFile"
    label="My file input"
    :allowedMimeTypes="['text/csv','text/xml']"
    :maxFileSize="8*1024*1024">
</sw-file-input>

Component properties

Property name Type Default
maxFileSize Number
allowedMimeTypes Array
label String
value

Methods

Method name Parameters
onChooseButtonClick No parameters
onRemoveIconClick No parameters
onFileInputChange No parameters
setSelectedFile newFile
checkFileSize file
checkFileType file

Imports

  • ./sw-file-input.html.twig
  • ./sw-file-input.scss

Mixins

  • notification

Twig blocks

  • sw_file_input_regular_header_label
  • sw_file_input_regular_header
  • sw_file_input_caption
  • sw_file_input_regular_choose_button
  • sw_file_input_actions
  • sw_file_input_regular_drop_zone
  • sw_file_input_regular
  • sw_file_input_hidden_form
  • sw_file_input