diff --git a/archives/archives.go b/archives/archives.go index d46e3d3..a96b6f3 100644 --- a/archives/archives.go +++ b/archives/archives.go @@ -556,13 +556,13 @@ func UploadArchive(ctx context.Context, rt *runtime.Runtime, archive *Archive) e archivePath := "" if archive.Period == DayPeriod { archivePath = fmt.Sprintf( - "/%d/%s_%s%d%02d%02d_%s.jsonl.gz", + "%d/%s_%s%d%02d%02d_%s.jsonl.gz", archive.Org.ID, archive.ArchiveType, archive.Period, archive.StartDate.Year(), archive.StartDate.Month(), archive.StartDate.Day(), archive.Hash) } else { archivePath = fmt.Sprintf( - "/%d/%s_%s%d%02d_%s.jsonl.gz", + "%d/%s_%s%d%02d_%s.jsonl.gz", archive.Org.ID, archive.ArchiveType, archive.Period, archive.StartDate.Year(), archive.StartDate.Month(), archive.Hash) diff --git a/archives/s3.go b/archives/s3.go index 83bdc9d..1d42d6a 100644 --- a/archives/s3.go +++ b/archives/s3.go @@ -21,7 +21,7 @@ import ( "github.com/nyaruka/rp-archiver/runtime" ) -const s3BucketURL = "https://%s.s3.amazonaws.com%s" +const s3BucketURL = "https://%s.s3.amazonaws.com/%s" // any file over this needs to be uploaded in chunks const maxSingleUploadBytes = 5e9 // 5GB