From a4e1ede4c207ec10dc0d0b67e431418b4c6321b3 Mon Sep 17 00:00:00 2001 From: To-om Date: Mon, 15 Jun 2020 18:44:32 +0200 Subject: [PATCH] #1371 Add attachment properties --- thehive/app/org/thp/thehive/controllers/v0/Properties.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/thehive/app/org/thp/thehive/controllers/v0/Properties.scala b/thehive/app/org/thp/thehive/controllers/v0/Properties.scala index e6889dad3f..b6ccafb411 100644 --- a/thehive/app/org/thp/thehive/controllers/v0/Properties.scala +++ b/thehive/app/org/thp/thehive/controllers/v0/Properties.scala @@ -343,7 +343,10 @@ class Properties @Inject() ( .property("tlp", UniMapping.int)(_.field.updatable) .property("dataType", UniMapping.string)(_.select(_.observableType.name).readonly) .property("data", UniMapping.string.optional)(_.select(_.data.data).readonly) - // TODO add attachment ? + .property("attachment.name", UniMapping.string.optional)(_.select(_.attachments.name).readonly) + .property("attachment.size", UniMapping.long.optional)(_.select(_.attachments.size).readonly) + .property("attachment.contentType", UniMapping.string.optional)(_.select(_.attachments.contentType).readonly) + .property("attachment.hashes", UniMapping.string)(_.select(_.attachments.hashes.map(_.toString)).readonly) .build lazy val organisation: List[PublicProperty[_, _]] =