Ж
Size: a a a
Ж
Y
GP
ExpressionEncoder
определяешь; это не очень удобно правда и обычно не нужно, тем более для тестовЖ
ExpressionEncoder
определяешь; это не очень удобно правда и обычно не нужно, тем более для тестовOℕ
Oℕ
S
def uploadToS3_example(req: Request[IO], attributes: Attributes) = {
val bucketName = "bucketName"
val key = "key"
val contentType = ContentType.parse("image/jpeg").right.get
val metaData = MetaHeaders(Map("Content-Type" -> "image/jpeg", "Cache-Control" -> "max-age = 3600"))
val accessControlList = CannedAcl.PublicRead
req.body
.through(toInputStream)
.evalMap(inputStream => IO(
StreamConverters
.fromInputStream(() => inputStream)
.runWith(
S3.multipartUpload(bucketName, key, contentType, metaData, accessControlList)
.withAttributes(attributes)
)
))
.compile
.drain
}
AD
def uploadToS3_example(req: Request[IO], attributes: Attributes) = {
val bucketName = "bucketName"
val key = "key"
val contentType = ContentType.parse("image/jpeg").right.get
val metaData = MetaHeaders(Map("Content-Type" -> "image/jpeg", "Cache-Control" -> "max-age = 3600"))
val accessControlList = CannedAcl.PublicRead
req.body
.through(toInputStream)
.evalMap(inputStream => IO(
StreamConverters
.fromInputStream(() => inputStream)
.runWith(
S3.multipartUpload(bucketName, key, contentType, metaData, accessControlList)
.withAttributes(attributes)
)
))
.compile
.drain
}
VG
GP
AD
SA
Oℕ
Oℕ
λ
VS
def uploadToS3_example(req: Request[IO], attributes: Attributes) = {
val bucketName = "bucketName"
val key = "key"
val contentType = ContentType.parse("image/jpeg").right.get
val metaData = MetaHeaders(Map("Content-Type" -> "image/jpeg", "Cache-Control" -> "max-age = 3600"))
val accessControlList = CannedAcl.PublicRead
req.body
.through(toInputStream)
.evalMap(inputStream => IO(
StreamConverters
.fromInputStream(() => inputStream)
.runWith(
S3.multipartUpload(bucketName, key, contentType, metaData, accessControlList)
.withAttributes(attributes)
)
))
.compile
.drain
}
S
N
Oℕ
Oℕ