#262 returning images MIME type as image.ContentType instead of "image/jpeg"
This commit is contained in:
parent
d49dafe324
commit
59d515b919
@ -56,7 +56,7 @@ namespace RMuseum.Controllers
|
||||
return BadRequest(imgPath.ExceptionString);
|
||||
|
||||
|
||||
return new FileStreamResult(new FileStream(imgPath.Result, FileMode.Open, FileAccess.Read), "image/jpeg");
|
||||
return new FileStreamResult(new FileStream(imgPath.Result, FileMode.Open, FileAccess.Read), img.Result.ContentType);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ namespace RSecurityBackend.Controllers
|
||||
return StatusCode(StatusCodes.Status304NotModified);
|
||||
}
|
||||
|
||||
return new FileStreamResult(new FileStream(imgPath, FileMode.Open, FileAccess.Read), "image/jpeg");
|
||||
return new FileStreamResult(new FileStream(imgPath, FileMode.Open, FileAccess.Read), img.ContentType);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user