From 7db08c6a6ca473eaee57ee7aeeffad3b0f1ad806 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Sun, 22 Mar 2026 20:15:27 +0100 Subject: [PATCH] feat: add keybase to jpg --- nex/datastore/super-mario-maker/complete_attach_file.go | 3 ++- nex/datastore/super-mario-maker/prepare_attach_file.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nex/datastore/super-mario-maker/complete_attach_file.go b/nex/datastore/super-mario-maker/complete_attach_file.go index 2df6704..265c7af 100644 --- a/nex/datastore/super-mario-maker/complete_attach_file.go +++ b/nex/datastore/super-mario-maker/complete_attach_file.go @@ -25,7 +25,8 @@ func CompleteAttachFile(err error, packet nex.PacketInterface, callID uint32, pa } bucket := os.Getenv("PN_SMM_CONFIG_S3_BUCKET") - key := fmt.Sprintf("%d.jpg", param.DataID) + key_base := os.Getenv("PN_SMM_CONFIG_S3_KEY_BASE") + key := fmt.Sprintf("%s/%d.jpg", key_base, param.DataID) objectSizeS3, err := globals.S3ObjectSize(bucket, key) if err != nil { diff --git a/nex/datastore/super-mario-maker/prepare_attach_file.go b/nex/datastore/super-mario-maker/prepare_attach_file.go index 0b5ae13..18b61e1 100644 --- a/nex/datastore/super-mario-maker/prepare_attach_file.go +++ b/nex/datastore/super-mario-maker/prepare_attach_file.go @@ -46,7 +46,8 @@ func PrepareAttachFile(err error, packet nex.PacketInterface, callID uint32, par // TODO - Check param.ContentType? Always seems to be "image/jpeg" but just in case? bucket := os.Getenv("PN_SMM_CONFIG_S3_BUCKET") - key := fmt.Sprintf("%d.jpg", dataID) + key_base := os.Getenv("PN_SMM_CONFIG_S3_KEY_BASE") + key := fmt.Sprintf("%s/%d.jpg", key_base, dataID) // TODO - Should this also take in the param.ContentType? To add it to the policy? URL, formData, _ := globals.Presigner.PostObject(bucket, key, time.Minute*15)