bwt-uploader
is a file uploader with support for pdf files, jpeg, png and bmp images written in Polymer. It follows a plug and play model with a few configurations needed to enable certain features. It is partially inspired by the vaadin uploader and came out as a result of a component we built at Blue Water Tracks. Images are converted to base64 images which might increase the size of the file by a small percentage.
- Simple Drag and Drop along with browse option
- Ability to upload images and pdf files
- Down sample and resize images (optional)
- Ability to upload pdf files
- Preview of pdf and image files (just the first page in case of pdf files)
- Progress Bar
- Configurable AJAX options as well as ability to insert extra fields into the upload object
- Ability to skip downsampling of image
- Configurable maximum file size
- Customizable CSS and shape of preview area
To install bower install bwt-uploader
To run the code, head into the component's folder and run polymer serve
To run the tests polymer test
bluewatertracks.github.io/bwt-uploader
A simple example of an Image upload
<bwt-uploader target="[yourUrl]" method="PUT" body="[[your Object]]" value="[[valueToBeDatabindedAsOutput]]"></bwt-uploader>
Both are welcome, feel free to create an issue and we will try to come up with fixes or added features for requests.
This project is licensed under the terms of the MIT license.