title: Getting "{"message":"Invalid value \"undefined\" for header \"Content-Type\""}" error when tried to download a container file
body: <p>I used the below code to get the file from azure container.</p>
  
  <pre><code>const azure = require('azure-storage');
  const url = `https://${storageAccountName}.blob.core.windows.net}`;
  const blobSvc = azure.createBlobService(storageAccountName, accessKey, url);
  
  const read = blobSvc.createReadStream(containerName, fileName);
  
  res.setHeader('Content-Disposition', `attachment; filename=${filename}`);
  res.setHeader('Content-Type', read.contentType);
  readable.stream.pipe(res);
  </code></pre>
  
  <p>But, when I download the text file, i m getting <code>{"message":"Invalid value \"undefined\" for header \"Content-Type\""}</code> in the file. </p>
  
  <pre><code>const azure = require('azure-storage');
  const url = `https://${storageAccountName}.blob.core.windows.net}`;
  const blobSvc = azure.createBlobService(storageAccountName, accessKey, url);
  
  const properties = blobSvc.getBlobProperties(
  containerName,
  fileName,
  function(err, properties, status) {
      if (err) {
          res.send(502, "Error fetching file: %s", err.message);
      } else if (!status.isSuccessful) {
          res.send(404, "The file %s does not exist", fileName);
      } else {
          return properties;
      }
  });
  </code></pre>
  
  <p>)</p>
  
  <p>return properties;</p>
  
  <p>In this function, for the first call, it is returning null, during the second call there are values poping out, but it is useless, as the await is not working in this case and the thread finishes with undefined value. Is there is something I'm missing out?</p>