upload finish

This commit is contained in:
vanilia
2025-11-11 15:59:31 +07:00
4 changed files with 5 additions and 4 deletions
@@ -49,7 +49,7 @@ func uploadAndGenerateFileUrl(input e.CreateDto, event *pl.Event) (string, error
if !puh.IsValidFileType(ext, bucket) {
return "", fmt.Errorf("invalid file type: %s", input.Filename)
}
objectName := fmt.Sprintf("%s%d%s", input.Type_Code, time.Now().UnixNano(), ext)
objectName := fmt.Sprintf("%v/%s-%d%s", *input.Ref_Id, input.Type_Code, time.Now().UnixNano(), ext)
uploadInput := pmh.UploadReaderInput{
BucketName: bucket,