この質問について1つのスレッドを見つけましたが、これは部分的に質問に答えましたが、詳細が必要になる可能性があります。
現在、AndroidアプリでBlobStoreを使用しようとしていますが、501エラー以外は取得できません(HTTPサーバーはリクエストを処理できません)。
彼は私のコードです;
HttpPost httpPostImg = new HttpPost(url);
Header header = new BasicHeader("Content-Type", "multipart/form-data");
Header h = new BasicHeader("Connection", "keep-alive");
MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
FormBodyPart form = new FormBodyPart("myFile",new ByteArrayBody(image,"multipart/form- data","pict.jpeg"));
entity.addPart(form);
httpPostImg.setEntity(entity);
httpPostImg.setHeader(header);
httpPostImg.setHeader(h);
response = httpClient.execute(httpPostImg);
processResponse(response);
非常にうまく機能しているGETリクエストによってURLを取得します。また、ByteArrayBodyを含むFormBodyPartを試し、ByteArrayBodyのmimeタイプを「multipart / form-data」に設定しようとしましたが、何も機能しませんでした。私は常に501エラーを受け取ります(サーバーはあなたのリクエストを処理できません)。
ありがとう、すべての答えはありがたいです。