Merge pull request #514 from yaohcn/feat/specific-ipfs-gateway
feat: specific ipfs gateway
This commit is contained in:
commit
e0efc770b2
@ -117,9 +117,13 @@ func (ft *fetch) wait() error {
|
||||
}
|
||||
|
||||
func doFetch(out string, info paramFile) error {
|
||||
log.Infof("Fetching %s", out)
|
||||
gw := os.Getenv("IPFS_GATEWAY")
|
||||
if gw == "" {
|
||||
gw = gateway
|
||||
}
|
||||
log.Infof("Fetching %s from %s", out, gw)
|
||||
|
||||
resp, err := http.Get(gateway + info.Cid)
|
||||
resp, err := http.Get(gw + info.Cid)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user