Upload

In order to use this component, you have to have our Javascript file included into your page. Binding happens automatically.

For MediaDB example, you have to take care of opening the MediaDB and passing the file from the MediaDB into the input.

For the Filedrop component, we use the jQuery Filedrop library.

Default

<e-upload>

<e-upload name="upload" placeholder="Placeholder text" button="Browse"></e-upload>
<e-upload name="upload" placeholder="Placeholder text" button="Browse"></e-upload>
JavaScript

Variations

Invalid[invalid]

<e-upload name="upload" placeholder="Placeholder text" button="Browse" invalid></e-upload>
<e-upload name="upload" placeholder="Placeholder text" button="Browse" invalid></e-upload>
JavaScript

With MediaDB

<e-upload name="upload" placeholder="Placeholder text" button="Browse" mediadb="From your Media Database" mediadb-callback="alert(&quot;From MediaDb&quot;);" browse="From Computer"></e-upload>
<e-upload name="upload" placeholder="Placeholder text" button="Browse" mediadb="From your Media Database" mediadb-callback="alert(&quot;From MediaDb&quot;);" browse="From Computer"></e-upload>
JavaScript

Filedrop.e-filedrop

<div class="e-filedrop">
  <div class="e-filedrop__content">
    <div class="text-size-title">
      Drag and drop a file here to get started
    </div>
    <div class="e-field text-size-title text-color-shade">
      or
    </div>
    <div class="e-field">
      <a class="e-btn e-btn-primary" href="#">
        Select a File
      </a>
    </div>
    <div class="text-color-shade">
      Please note: only .csv files can be imported.
    </div>
  </div>
</div>
<div class="e-filedrop">
  <div class="e-filedrop__content">
    <div class="text-size-title">
      Drag and drop a file here to get started
    </div>
    <div class="e-field text-size-title text-color-shade">
      or
    </div>
    <div class="e-field">
      <a class="e-btn e-btn-primary" href="#">
        Select a File
      </a>
    </div>
    <div class="text-color-shade">
      Please note: only .csv files can be imported.
    </div>
  </div>
</div>
JavaScript
Drag and drop a file here to get started
or
Please note: only .csv files can be imported.

Filedrop.e-filedrop-over

<div class="e-filedrop e-filedrop-over">
  <div class="e-filedrop__content">
    <div class="text-size-title">
      Drag and drop a file here to get started
    </div>
    <div class="e-field text-size-title text-color-shade">
      or
    </div>
    <div class="e-field">
      <a class="e-btn e-btn-primary" href="#">
        Select a File
      </a>
    </div>
    <div class="text-color-shade">
      Please note: only .csv files can be imported.
    </div>
  </div>
</div>
<div class="e-filedrop e-filedrop-over">
  <div class="e-filedrop__content">
    <div class="text-size-title">
      Drag and drop a file here to get started
    </div>
    <div class="e-field text-size-title text-color-shade">
      or
    </div>
    <div class="e-field">
      <a class="e-btn e-btn-primary" href="#">
        Select a File
      </a>
    </div>
    <div class="text-color-shade">
      Please note: only .csv files can be imported.
    </div>
  </div>
</div>
JavaScript
Drag and drop a file here to get started
or
Please note: only .csv files can be imported.

Overlay.e-filedrop-overlay

<div class="e-filedrop e-filedrop-overlay e-filedrop-over">
  <div class="e-filedrop__content">
    <e-icon icon="e-cloud-upload" size="middle"></e-icon>
    <div class="text-size-title">
      Drag and drop a file here to get started
    </div>
  </div>
</div>
<div class="e-filedrop e-filedrop-overlay e-filedrop-over">
  <div class="e-filedrop__content">
    <e-icon icon="e-cloud-upload" size="middle"></e-icon>
    <div class="text-size-title">
      Drag and drop a file here to get started
    </div>
  </div>
</div>
JavaScript
Show / Hide
Drag and drop a file here to get started

API Reference

Properties

NameDescriptionTypeRequiredDefault value
nameFile input name attributestring
placeholderText input placeholder attributestring
button"Browse local files" button labelstringChoose File
mediadbAdd Media Database dropdownstringFrom your Media Database
browse"Browse local files" button label if set mediadbstringChoose File
invalidDefines invalid state of the input.booleanfalse

Events

EventDescriptionReturns
updateFires on upload change and returns the file list{ detail: { files: [file] } }