Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipfs: Let Catalyst handle ipfs:// URLs #102

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/task-runner/task-runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func parseFlags(build BuildFlags) cliFlags {
fs.StringVar(&cli.runnerOpts.PinataAccessToken, "pinata-access-token", "", "JWT access token for the Piñata API")
URLVarFlag(fs, &cli.runnerOpts.PlayerImmutableURL, "player-immutable-url", "ipfs://bafybeihcqgu4rmsrlkqvavkzsnu7h5n66jopckes6u5zrhs3kcffqvylge/", "Base URL for an immutable version of the Livepeer Player to be included in NFTs metadata")
URLVarFlag(fs, &cli.runnerOpts.PlayerExternalURL, "player-external-url", "https://lvpr.tv/", "Base URL for the updateable version of the Livepeer Player to be included in NFTs external URL")
// TODO(yondonfu): Deprecate once the import task is no longer used because Catalyst will handle import from IPFS
URLSliceVarFlag(fs, &cli.runnerOpts.ImportIPFSGatewayURLs, "import-ipfs-gateway-urls", "https://w3s.link/ipfs/,https://ipfs.io/ipfs/,https://cloudflare-ipfs.com/ipfs/", "Comma delimited ordered list of IPFS gateways (includes /ipfs/ suffix) to import assets from")

// Server options
Expand Down
7 changes: 0 additions & 7 deletions task/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,6 @@ func getFileUrl(os *api.ObjectStore, cfg ImportTaskConfig, params api.UploadTask
return "", fmt.Errorf("no URL or uploaded object key specified")
}

if strings.HasPrefix(params.URL, IPFS_PREFIX) {
cid := strings.TrimPrefix(params.URL, IPFS_PREFIX)
if len(cfg.ImportIPFSGatewayURLs) == 0 {
return "", fmt.Errorf("no IPFS gateways configured")
}
return cfg.ImportIPFSGatewayURLs[0].JoinPath(cid).String(), nil
}
if strings.HasPrefix(params.URL, ARWEAVE_PREFIX) {
txID := strings.TrimPrefix(params.URL, ARWEAVE_PREFIX)
// arweave.net is the main gateway for Arweave right now
Expand Down