title: TypeError: The header content contains invalid characters
body: <p>below is my function to get file from my server writing in sailsJS.
  When i try run this function, my console throw me this type of error:
  <code>TypeError: The header content contains invalid characters</code></p>
  
  <p>In postman i send file in pdf format,</p>
  
  <p>How content-type should look here?</p>
  
  <pre><code>fn: async function ({ id }, exits) {
  
      this.res.set('Content-disposition', `attachment; filename=${id}`, 'content-type', 'application/pdf')//here
      this.res.set('Access-Control-Allow-Origin', '*')
  
      const localPath = path.join(sails.config.custom.uploadDirectory, id)
  
      this.res.sendFile(localPath);
    }
  </code></pre>
  
  <p><strong>and how to open fle in a browser instead of download him to desktop?</strong></p>
  
  <p>thanks in advance</p>