From 1a22c2818470c9a704b4e802b090d9744542b3f4 Mon Sep 17 00:00:00 2001 From: Steven Zhu Date: Wed, 1 Feb 2017 15:57:13 -0600 Subject: [PATCH] partially resolve issue #1 --- core/net/auvsi-client.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/core/net/auvsi-client.js b/core/net/auvsi-client.js index 654e3f8..c0b8309 100644 --- a/core/net/auvsi-client.js +++ b/core/net/auvsi-client.js @@ -259,9 +259,7 @@ class AUVSIClient { } postTargetImage(id, imageBase64, callback) { - // FIXME: Encode image for the server - - let image = imageBase64; + let image = Buffer.from(imageBase64,'base64'); this._request({ method: 'POST', @@ -281,15 +279,13 @@ class AUVSIClient { returns: true }, (body) => { // FIXME: Decode image back to base64 - + // return Buffer.from(body,'binary').toString('base64'); return body }, callback); } putTargetImage(id, imageBase64, callback) { - // FIXME: Encode image for the server - - let image = imageBase64; + let image = Buffer.from(imageBase64,'base64'); this._request({ method: 'PUT',