title: Unable to send email with PDF attachment using Chrome
body: <p>I have a form that a user enters information and has the option to upload a document. Once they have filled out the form and click on the submit button, an email is sent to the indicated reciever. This works fine in IE and Firefox (whether the user uploads/doesnt upload a document).</p>
  <p>However, when a user uploads a document and submits the form in chrome, it appears that chrome tries to process the document and then crashes.</p>
  <p>Here is the logic where I check if a user has upload a document to the form and I store it in a temp folder:</p>
  <pre><code>&lt;cfif isdefined(&quot;FORM.file_type_attachment&quot;) AND Len(FORM.file_type_attachment) GT 0&gt;
     &lt;!--- first actually upload the file ---&gt;
     &lt;cffile action=&quot;upload&quot;
               filefield=&quot;file_type_attachment&quot;
               destination=&quot;destination of file&quot;
               nameconflict=&quot;Makeunique&quot;&gt;
      &lt;!--- now create a temporary holder for the attachment later on ---&gt;
      &lt;cfset attachment_local_file_1 = &quot;file location&quot;&gt;
  &lt;/cfif&gt;
  
  &lt;!--- Attaches attachment to email. ---&gt;
  &lt;cfsilent&gt;
      &lt;!--- Note that I used the &lt;CFSILENT&gt; tag, this will kill the white space in this area so your email is not cluttered with white space. ---&gt;
      &lt;cfif isdefined(&quot;FORM.file_type_attachment&quot;) AND Len(FORM.file_type_attachment) GT 0&gt;
          &lt;cfmailparam file=&quot;#attachment_local_file_1#&quot;&gt;
      &lt;/cfif&gt;
  &lt;/cfsilent&gt; 
  </code></pre>
  <p><strong>Update5:</strong> I am able to send certain files with no issues. However, when a user attempts to email a pdf file, Chrome is not able to process and an error populates notifying the user an error has occured. On the dev tools, I am seeing the following:
  <a href="https://i.stack.imgur.com/3oRwU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3oRwU.png" alt="This is what I have done so far. This works fine if a" /></a></p>
  <p>The following code is the approach I attempted to allow users to attach document. Is there a different approach when handling PDF's? Any help would be appreciated.</p>
  <pre><code>        var sendForm = function(event) {
              event.preventDefault();
              var url = 'MarcomRequestSent.cfm';
              document.getElementById('smbt').disabled = true;
              var form = event.target;
              var formData = new FormData(form);
              var xhr = new XMLHttpRequest();
              xhr.open('POST', url, true);
              //xhr.setRequestHeader('Content-type', undefined);
              xhr.onload = function(e) { 
                  if(xhr.status == 200) {
                      //open the modal once the form passes validation
                      var m = modal.open({content: &quot;&lt;div class='modal-content'&gt;&lt;div class='modal-header'&gt;&lt;h4 class='modal-title' style='color: #9EC630 !important; font-size:28px; text-align:center;'&gt;Request Sent&lt;/h4&gt;&lt;button style='border:none;' id='closex' type='button' class='close' data-dismiss='modal' aria-label='Close'&gt;&lt;span aria-hidden='true' style='color:black'&gt;x&lt;/span&gt;&lt;/button&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class='modal-body'&gt;&quot; + &quot;&lt;p style='font-size:16px'&gt;To return to the Marketing page, please click &lt;a href='marketing.cfm'&gt;here&lt;/a&gt;.&quot;});             
                      if(m == true) {
                          return m;
                      } 
                      console.log('Form data (including any attachment) has been uploaded successfully.'); 
                  }
                  else {
                      if(xhr.status == 500){
                          alert(&quot;We seem to have encountered a problem. Please contact IT.&quot;);
                      }
                  }
              };
              xhr.onerror = function(e) { 
                  alert(&quot;We seem to have encountered a problem. Please contact IT.&quot;); 
              };
              xhr.send(formData);
          };
  
          document.getElementById('marcom_request_form').addEventListener('submit', sendForm);
  </code></pre>
  <p>Is there a way I can have users send pdf? Need the help</p>