@ppci-mock/custom-file-upload
v1.2.16
Published
file upload
Downloads
1
Readme
File Upload
Table of contents
Installation
NPM
npm i @ppci-mock/custom-file-upload
// Polyfill: https://lit-element.polymer-project.org/guide/use#polyfills
npm i --save-dev @webcomponents/webcomponentsjs
Usage
Javascript
import '@ppci-mock/custom-file-upload'
Browser
<!-- Default -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci-mock/custom-file-upload/builds/index.min.js" />
<!-- Legacy -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci-mock/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>