0
ギャラリーから写真をアップロードします。ギャラリーからカメラから取り込んだ画像をアップロードすると、このエラーが発生します。com.android.volley.servererrorでヌル応答を取得
ボレーコードは以下の通りです:
StringRequest stringRequest = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
Toast.makeText(upload.this,response, Toast.LENGTH_SHORT).show();
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) { error.printStackTrace();
}
}){
protected Map<String,String> getParams()
{
Map<String,String> params = new HashMap<String, String>();
params.put("photo",str_photo);
params.put("title",str_caption);
params.put("name",str_caption);
params.put("admin_id",admin_id);
return params;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(upload.this);
requestQueue.add(stringRequest);
logcatは
06-28 10:24:43.442 8774-10428/laurel.wedding E/Volley: [1802] BasicNetwork.performRequest: Unexpected response code 413 for http://teachieparentine.com/Wedding_App/photo_upload.php
郵便番号を使用して同じapiを試しましたか? –