title: Save Image to Json File
body: <p>I trying to create a extension for a browser and i want do save images local. I was hoping to save the images in a json file. I'm pretty lost has how to do its. Below is my code although I'm sure that I am pretty far off. Thanks</p>
  
  <pre><code>&lt;label&gt;Add New Image From Desktop&lt;/label&gt;
          &lt;input type="radio" title="Add New Image From Local Machine" name="addMethod" id="radio" /&gt;
          &lt;/br&gt;
          &lt;input  type="file" id="file-field"/&gt;
          &lt;input type="button" id="upload" value="Submit" /&gt;
          &lt;/br&gt;
          &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" language="JavaScript"&gt;
              $(document).ready(function() {
                  $("#upload").click(function(data) {
                      //alert(data);
                      $.ajax({
                          type : "POST",
                          url : "settings.json",
                          dataType : 'json',
                          data : {
                              json : JSONArray.stringify(data) /* convert here only */
                          }
                      });
                      window.location.reload();
                  });
              });
          &lt;/script&gt;
  </code></pre>