node.js - when/node liftAll not working on s3 object -


I try to delete all functions in an Amazon S3 object using when / node I am doing

  var when required = ('when'); Var requires nodefn = ('when / node'); Var AWS = Required ('AAS-SDK'); Var s3 = new AWS.S3 (); Var promise 3 = nodeph. Lift all (s3); When (Wired S. ListBackets) Then (function (data) {console.log (data);})  

However, it seems that a request object is being printed. What I am going to do here is, like the harm, if I lift myself individually as separate tasks, then I can get the right result:

  var ListBucketsP = nodefn.lift (s3.listBuckets bind (S3));  

Any ideas?

Try it out:

  nodefen Lift all (S3 .__Peto__, undefined, s3);  

Then just

  s3.listBuckets (). Then (function (data) {console.log (data);});  

This worked for me

Explanation: The methods you are trying to modify are not part of the s3 object , But its prototype when the source object in the logic version of 3 is the first, an optional change function, and finally the destination object (to attach the actions taken).

So we are taking the function from the prototype and we can attach the provisioned version to the object we are working with.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -