Not able to upload file by using dropbox on cordova app based on meteor


#1

I want to use dropbox to upload files on my cordova app based on meteor i.e., user will be given option if he wants to upload file using dropbox if user click on the button then inappbrowser should open from where user will be authenticated and can upload file.

I am using
< script type=“text/javascript” src=“https://www.dropbox.com/static/api/2/dropins.js” id=“id_dropbox” data-app-key=“xxxxxxxxxxx”>
this script.

This is the code

   e.preventDefault();
     Dropbox.choose({
        linkType: "direct",
        multiselect: false,
        extensions: ['.doc'],
        success: function(files) {
            console.log("files ", files[0]);
            if(files[0]['bytes']<1000000){
            	GetBlobDataDropbox(files)    //function to upload file
            }else{
            	alert('Size should be less than 1 mb')
            } 
   },
        error:function(error){console.log(error)},
        cancel:  function() {}
    }); 

This is giving me error “maximum call stack size exceded”. please tell how to resolve it.