Skip to content

Commit

Permalink
Merge pull request #1389 from nationalarchives/TDRD-NOJIRA-strip-obje…
Browse files Browse the repository at this point in the history
…ct-tagging

Tdrd nojira strip object tagging
  • Loading branch information
TomJKing authored Nov 20, 2024
2 parents 78f6c5b + aa496cd commit 0db96cd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import io.circe.syntax._
import io.circe.{Json, JsonObject, Printer}
import software.amazon.awssdk.core.sync.RequestBody
import software.amazon.awssdk.services.s3.S3Client
import software.amazon.awssdk.services.s3.model.{CopyObjectRequest, ListObjectsV2Request, PutObjectRequest, S3Object}
import software.amazon.awssdk.services.s3.model.{CopyObjectRequest, ListObjectsV2Request, PutObjectRequest, S3Object, Tagging, TaggingDirective}
import uk.gov.nationalarchives.`export`.Main.Config
import uk.gov.nationalarchives.`export`.MetadataUtils.{ConsignmentType, Judgment, Metadata, Standard}
import uk.gov.nationalarchives.`export`.S3Utils.FileOutput
Expand Down Expand Up @@ -52,6 +52,8 @@ class S3Utils(config: Config, s3Client: S3Client) {
.sourceBucket(config.s3.cleanBucket)
.destinationKey(destinationKey)
.destinationBucket(destinationBucket)
.taggingDirective(TaggingDirective.REPLACE)
.tagging(Tagging.builder().build())
.build()
s3Client.copyObject(copyRequest)
val series = consignmentMetadata.find(_.propertyName == "Series").map(_.value)
Expand Down

0 comments on commit 0db96cd

Please sign in to comment.