func (c *GitHTTPComponent) buildUploadLink(req types.BatchRequest, pointer types.Pointer) string { return c.config.APIServer.PublicDomain + "/" + path.Join(fmt.Sprintf("%ss", req.RepoType), url.PathEscape(req.Namespace), url.PathEscape(req.Name+".git"), "info/lfs/objects", url.PathEscape(pointer.Oi
(req types.BatchRequest, pointer types.Pointer)
| 685 | // } |
| 686 | |
| 687 | func (c *GitHTTPComponent) buildUploadLink(req types.BatchRequest, pointer types.Pointer) string { |
| 688 | objectKey := path.Join("lfs", pointer.RelativePath()) |
| 689 | u, err := c.s3Client.PresignedPutObject(context.Background(), c.config.S3.Bucket, objectKey, time.Hour*24) |
| 690 | if err != nil { |
| 691 | return c.config.APIServer.PublicDomain + "/" + path.Join(fmt.Sprintf("%ss", req.RepoType), url.PathEscape(req.Namespace), url.PathEscape(req.Name+".git"), "info/lfs/objects", url.PathEscape(pointer.Oid), strconv.FormatInt(pointer.Size, 10)) |
| 692 | } |
| 693 | return u.String() |
| 694 | } |
| 695 | |
| 696 | func (c *GitHTTPComponent) buildVerifyLink(req types.BatchRequest) string { |
| 697 | return c.config.APIServer.PublicDomain + "/" + path.Join(fmt.Sprintf("%ss", req.RepoType), url.PathEscape(req.Namespace), url.PathEscape(req.Name+".git"), "info/lfs/verify") |
no test coverage detected