diff --git a/commands/analyze/face.js b/commands/analyze/face.js index 6a621468..47671e14 100644 --- a/commands/analyze/face.js +++ b/commands/analyze/face.js @@ -63,7 +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') - .attach('image_file', imgData.body) + .headers({ 'Content-Type': 'multipart/form-data' }) + .attach({ image_file: imgData.body }) .query({ api_key: FACEPLUSPLUS_KEY, api_secret: FACEPLUSPLUS_SECRET,