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)