feat: add keybase to jpg

This commit is contained in:
mrjvs
2026-03-22 20:15:27 +01:00
parent 8d9abc6035
commit 7db08c6a6c
2 changed files with 4 additions and 2 deletions

View File

@@ -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 {

View File

@@ -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)