Skip to content

Commit

Permalink
Fix uploading archives
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Aug 23, 2024
1 parent ecaef03 commit 38cde6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions archives/archives.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion archives/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 38cde6c

Please sign in to comment.