0
を返します。テスト時に私のIDが返されるのを見ることができませんでした。代わりに、私はブラウザで返された画像しか見ることができません。クロムでHTTPGETは私は以下の機能が画像とIDを返すために使用されて持っている画像及びId
int id = 0;
using (Bitmap bitmap = Image.Generate(context, out id))
{
HttpResponse response = context.Response;
response.CacheControl = "no-cache";
response.ContentType = "image/JPG";
bitmap.Save(response.OutputStream, ImageFormat.Jpeg);
response.End();
var responseModel = new ResponseModel
{
Id = id,
Image = bitmap
};
return Ok(responseModel);
};
画像が含まれている場合、これは、応答を返すための適切な方法は何ですか?もしそうなら、イメージとIDを含むajax呼び出しからこの応答データを取得するにはどうすればよいですか(Json.parseで行うことができますか?これはbytedataですか?)あなたができる