From a40f189c2d5efed571f0f82bcd2bc7a9ac137d4d Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 25 Aug 2020 20:43:31 -0400 Subject: [PATCH] Fix --- commands/analyze/face.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/analyze/face.js b/commands/analyze/face.js index f3039985..bb9b1cc4 100644 --- a/commands/analyze/face.js +++ b/commands/analyze/face.js @@ -63,8 +63,8 @@ module.exports = class FaceCommand extends Command { if (Buffer.byteLength(imgData.body) >= 2e+6) return 'size'; const { body } = await request .post('https://api-us.faceplusplus.com/facepp/v3/detect') - .set({ 'Content-Type': 'multipart/form-data' }) - .attach({ image_file: imgData.body }) + .set({ 'content-type': 'multipart/form-data' }) + .attach('image_file', imgData.body) .query({ api_key: FACEPLUSPLUS_KEY, api_secret: FACEPLUSPLUS_SECRET,