title: save image to server
body: <p>I want to upload my chart image as png to the server.</p>
  
  <p>my code is like this :</p>
  
  <pre><code>save.setOnClickListener(new View.OnClickListener() {
      public void onClick(View v) {
      int index = 1;  
      Bitmap bitmap = mChartView.toBitmap();
      try {
        File file = new File(Environment.getExternalStorageDirectory(), "Chart" + index++ + ".png");
        FileOutputStream output = new FileOutputStream(file);
        bitmap.compress(CompressFormat.PNG, 100, output);
      } catch (Exception e) {
        e.printStackTrace();
     }
    }
  });
  </code></pre>
  
  <p>so, when I clicked save button, the png file will be uploaded to the server (database mysql, table name = file, field = image)
  anyone know how to do it? thanks before</p>