Skip to content

Commit

Permalink
fix(server): Fixed to use parameter uuid instead of generated uuid (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
orisano authored Mar 8, 2024
1 parent 4da0d7e commit c3321e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/internal/infrastructure/gcp/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (f *fileRepo) GetURL(a *asset.Asset) string {
}

func (f *fileRepo) IssueUploadAssetLink(ctx context.Context, param gateway.IssueUploadAssetParam) (*gateway.UploadAssetLink, error) {
uuid := newUUID()
uuid := param.UUID
contentType := param.ContentType()

p := getGCSObjectPath(uuid, param.Filename)
Expand Down Expand Up @@ -174,7 +174,7 @@ func (f *fileRepo) UploadedAsset(ctx context.Context, u *asset.Upload) (*file.Fi
}
attrs, err := bucket.Object(p).Attrs(ctx)
if err != nil {
return nil, err
return nil, fmt.Errorf("attrs(object=%s): %w", p, err)
}
return &file.File{
Content: nil,
Expand Down

0 comments on commit c3321e7

Please sign in to comment.