1.0.3 • Published 8 years ago

jp-jquery-upload v1.0.3

Weekly downloads
14
License
-
Repository
github
Last release
8 years ago

jp-jquery-upload

npm package jquery upload

##Install

npm install --save jp-jquery-upload

##Usage

import $ from 'jquery';
import upload from 'jp-jquery-upload';

$.upload( '/upload.php', new FormData( $("#formUpload")[0] ))
  .progress( function( progressEvent, upload) {
    if( progressEvent.lengthComputable) {
      var percent = Math.round( progressEvent.loaded * 100 / progressEvent.total);
      if( upload) {
        console.log( percent + '% uploaded');
      } else {
        console.log( percent + '% downloaded');
      }
    }
  })
  .fail(function(){
    console.log('error');
  })
  .done( function(res) {
    console.log('successfull');
  });
          
1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago