javascript - AWS S3 putobject and after DetectFaces with Rekognition -


iam doing project nodejs , aws.

i using webrtc , taking photo.

after taking photos base64 data , posting nodejs , putting aws console , using detectfaces giving error.

but adding photo aws console manually detect faces not giving error.

my codes here : webcam js : giving base64 me.

> drawimage(video, 0, 0, canvas.width, canvas.height); >      var data = canvas.todataurl('image/jpeg'); >       photo.setattribute('src', data); >       console.log(data); 

and trying post postman chrome extension nodejs can put can't using detect faces.

my nodejs :

app.post('/addphoto', function (req, res) {  var base64data=new buffer(req.body.photo.replace(/^data:image\/\w+;base64,/, ""),'base64'); console.log(base64data);   var params = {bucket:  "realeyeshomework", key:"111111111.jpg", body: base64data};    s3.putobject(params, function(err, data) {      if (err)        console.log(err)      else{        console.log("1");         rekognition.detectfaces( {  image: {         s3object: {         bucket: "realeyeshomework",         name:"111111111.jpg"         }       },  attributes: [     "all"   ] }, function(error, response) {         if (error) console.log(error, error.stack); // error occurred         else  res.send(response);     });      }    }); }); 

my error : click here error

how can please me not fint anything.

thanks help.

you set ?

var rekognition = new aws.rekognition({apiversion: '2016-06-27'}); 

try watch examples code


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -