@ppci/custom-file-upload
v1.2.1
Published
file upload
Downloads
9
Readme
File Upload
Table of contents
Installation
NPM
npm i @ppci/custom-file-upload
// Polyfill: https://lit-element.polymer-project.org/guide/use#polyfills
npm i --save-dev @webcomponents/webcomponentsjs
Usage
Javascript
import '@ppci/custom-file-upload'
Browser
<!-- Default -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci/custom-file-upload/builds/index.min.js" />
<!-- Legacy -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci/custom-file-upload/builds/legacy.min.js" />
<!-- Component -->
<custom-file-upload
accept="* | image/* | audio/* | video/* "
multiple
allowedExtensions="['.jpg', '.png']"
maxFileSize="2000000"
@change=${Function}
>
<button>Upload File</button>
</custom-file-upload>