auto content size when serving image (todo: stream?)
This commit is contained in:
parent
fefae5fb3f
commit
b192b0c048
|
@ -103,8 +103,7 @@ final class Main(
|
|||
case Some(image) =>
|
||||
lila.log("image").info(s"Serving ${image.path} to ${HTTPRequest printClient req}")
|
||||
Ok(image.data).withHeaders(
|
||||
CONTENT_DISPOSITION -> image.name,
|
||||
CONTENT_LENGTH -> image.size.toString
|
||||
CONTENT_DISPOSITION -> image.name
|
||||
) as image.contentType.getOrElse("image/jpeg")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue