Skip to content

Commit

Permalink
Swap base64 for 32 encoding when constructing s3 key (flyteorg#406)
Browse files Browse the repository at this point in the history
Signed-off-by: Yee Hing Tong <[email protected]>
  • Loading branch information
wild-endeavor authored Apr 14, 2022
1 parent 91787d2 commit c4f1ec1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dataproxy/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dataproxy

import (
"context"
"encoding/base32"
"encoding/base64"
"fmt"
"strings"
Expand Down Expand Up @@ -60,8 +61,10 @@ func (s Service) CreateUploadLocation(ctx context.Context, req *service.CreateUp
}

md5 := base64.StdEncoding.EncodeToString(req.ContentMd5)
urlSafeMd5 := base32.StdEncoding.EncodeToString(req.ContentMd5)

storagePath, err := createShardedStorageLocation(ctx, s.shardSelector, s.dataStore, s.cfg.Upload,
req.Project, req.Domain, md5, req.Filename)
req.Project, req.Domain, urlSafeMd5, req.Filename)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit c4f1ec1

Please sign in to comment.