(ctx context.Context, file model.Obj, args model.LinkArgs)
| 78 | } |
| 79 | |
| 80 | func (d *IPFS) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error) { |
| 81 | gateurl := d.gateURL.JoinPath("/ipfs/", file.GetID()) |
| 82 | gateurl.RawQuery = "filename=" + url.QueryEscape(file.GetName()) |
| 83 | return &model.Link{URL: gateurl.String()}, nil |
| 84 | } |
| 85 | |
| 86 | func (d *IPFS) Get(ctx context.Context, rawPath string) (model.Obj, error) { |
| 87 | rawPath = path.Join(d.GetRootPath(), rawPath) |