I want to add an image file into json object . Is it possible to add image file into json object?
I tried below code but its not working ? Because i want to send that json object to the server then server will read my image file and store into that database.
JSONObject test = new JSONObject();
test.put("photo",new File(// Here i set image uri));
So when I print this json object it only show me the image path where the image stored. I want file for sending it to server.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…