title: Convert a base64 to a file in Javascript
body: <p>The goal is to transform a base64 string into a sendable jpg file, I cant use the html input type file but i have to serve in the same format. I am  bit lost with file generation. (I am on a client side mobile app).</p>
  
  <p>This is what i have:</p>
  
  <pre><code> file = "data:image/jpg;base64,#{imageData}"
  </code></pre>
  
  <p>imageData is the base64 string</p>
  
  <p>There is a way to transform this into a valid file?</p>