Skip to content

vulcan-estudios/vulcanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7a9804e · Jul 8, 2016

History

15 Commits
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016
Jul 8, 2016

Repository files navigation

VulcanUp

npm version

jQuery plugin to upload single files and preview images using blueimp/jQuery-File-Upload.

Demo

See demo for a quick start.

Install

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:

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 install

And start the server:

node demo/server.js

To see demo at http://localhost:7500.

License

MIT