title: Attach Files to Mandrill Message with Browse Button
body: <p>I'm not sure whether this is even possible, but I'm trying to attach a file to an outgoing email with the <a href="https://mandrillapp.com/api/docs/messages.JSON.html" rel="nofollow">Mandrill API</a> from the file upload button (<code>input type="file"</code>). To be honest, I'm not entirely sure what <code>document.getElementById('idOfFileInput').value</code> actually returns. I know that this is not the place to ask a novice question like that, but I've looked everywhere and I can't find it (I know one of you will be sly and point me to some article within five minutes). That aside, though, I've gotten a .txt file to attach with the message <code>C:\fakepath\test.txt</code>, which I know to be the file path that the browser gives for security. Maybe it's better asked in code:</p>
  
  <p>Button:
      </p>
  
  <pre><code>Attachment(s):&amp;nbsp;&amp;nbsp;&lt;input type="file" id="file"&gt;
  </code></pre>
  
  <p>JS:
     </p>
  
  <pre><code>"attachments": [
          {
              "type": "text/*",
              "name": "file_attachment",
              "content": document.getElementById('file').value
          }
      ],
  </code></pre>
  
  <p>I'm sorry if this is a simple question disguised by its context, but even if it is, I have a feeling that this question could be a good future reference because I've been trying things for a week and looking for some type of solution, but I haven't been able to find one. Any ideas?</p>