vulcanup v1.0.0-beta
VulcanUp
jQuery plugin to upload single files and preview images using blueimp/jQuery-File-Upload.
See demo for a quick start.
Install
To install the plugin with Browserify or Webpack:
$ npm install --save-dev vulcanupTo install the styles with SASS, include the path:
./node_modules/vulcanup/src/scssAnd import:
@import 'vulcanup';Or you can just use the built files:
The plugin dependencies are:
- jquery
- blueimp/jQuery-File-Upload, its dependencies and its addon jquery.fileupload-process.js
- materialdesignicons.com
An example of installation with built files is in the demo.
Configuration and use
By default the plugin sends an XHR type POST to the endpoint /api/files with the file as file parameter.
The plugin by default expects the server to return a response with the following JSON { files: [ { url: String } ] } to know the upload was successful. In the demo I used aguidrevitch/jquery-file-upload-middleware which returns a similar object.
The icons by default are configured with materialdesignicons.com but you have to install it.
See JavaScript API and SASS variables for configuration details.
Demo
You can see a complete demo in demo folder.
Install dependencies:
npm installAnd start the server:
node demo/server.jsTo see demo at http://localhost:7500.
License
9 years ago