title: Submit form including file upload via jQuery ajax
body: <p>HTML:</p>
  
  <pre><code>&lt;input type="text" name="description"&gt;
  &lt;input type="file" name="image" accept=".jpg"&gt;
  </code></pre>
  
  <p>How can I use <code>$.ajax</code> to upload the image and text value? I have no problem producing an object to submit text data, but have no idea where to start with the image.</p>
  
  <p>I am using PHP server-side, so encoding the image in base64 or similar methods are perfectly acceptable.</p>