title: Formdata Request ShortPixel API
body: <p>I'm trying to make a request for the ShortPixel, in case it's a request with multipart / form-data and I receive the return</p>
  
  <pre><code>{ Status: { Code: -115, Message: 'Uploaded files are missing.' } } }
  </code></pre>
  
  <p>API link <a href="https://shortpixel.com/api-docs#reducer-api-params" rel="nofollow noreferrer">https://shortpixel.com/api-docs#reducer-api-params</a></p>
  
  <pre><code>const FormData = require("form-data")
  const axios = require('axios')
  const data = new FormData();
  const url = 'https://api.shortpixel.com/v2/post-reducer.php'
  
  const config = {  headers: {
    'accept': 'application/json',
    'Accept-Language': 'en-US,en;q=0.8',
    'Content-Type': `multipart/form-data; boundary=${data._boundary}`,
  }}
  
  data.append('hiroshi.png', fs.createReadStream("/home/hiroshi/Documents/projetos/compress/imagens/original/hiroshi.png"), 'hiroshi.png');
  
  
  axios.post(url,options,{formData:data}, config)
    .then((response) =&gt; {
      console.log(response)
    }).catch((error) =&gt; {
     console.log(error)
    });
  </code></pre>