1

I am using angular-evaporate https://github.com/uqee/angular-evaporate for uploading files to Amazon Web Service(AWS). I need to add a cancel button in it.There is a function already available in Evaporate.js.

_.cancel = function(id){

    l.d('cancel ', id);
    if (files[id]){
       files[id].stop();
       return true;
    } else {
       return false;
    }
 };

But i don't know how to cal it on a button click.I am new in angulare js,Please help me.

Dennis Kriechel
  • 3,719
  • 14
  • 40
  • 62
Shijin TR
  • 7,516
  • 10
  • 55
  • 122

1 Answers1

1

It should be done in latest master branch (added 13 May), but not in 1.4.3. To install master, run

bower uninstall angular-evaporate
bower install angular-evaporate#master

You could fork stable version or change angular-evaporate.js part with eva._.add({ and change it to file.id = eva._.add({ and once adding is complete, proxy evaporate.js method

      file.cancel = function(){
        eva._.cancel(file.id);
      };
Artjom Kurapov
  • 6,115
  • 4
  • 32
  • 42