jQuery plugin to upload single files and preview images using blueimp/jQuery-File-Upload.
See demo for a quick start.
To install the plugin with Browserify or Webpack:
$ npm install --save-dev vulcanup
To install the styles with SASS, include the path:
./node_modules/vulcanup/src/scss
And 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.
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.
You can see a complete demo in demo folder.
Install dependencies:
npm install
And start the server:
node demo/server.js
To see demo at http://localhost:7500
.