Subversion Repository Public Repository

Nextrek

Diff Revisions 302 vs 304 for /Android/SmartCharging/endPoints/upload_image.php

Diff revisions: vs.
  @@ -8,6 +8,8 @@
8 8 }
9 9
10 10 $image_filename = "";
11 + $risposta = array();
12 + $risposta["return"] = 0;
11 13
12 14 if(isset($_FILES['image_file']))
13 15 {
  @@ -25,9 +27,11 @@
25 27 move_uploaded_file($file['tmp_name'], "./images/temp/".session_id()."/".$image_filename);
26 28 array_push($_SESSION["images"], $image_filename);
27 29 }
30 + else {
31 + $risposta["return"] = 0;
32 + }
28 33 }
29 34
30 - $risposta = array();
31 35 $risposta["image_file"] = $image_filename;
32 36
33 37 echo json_encode($risposta);