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