Skip to content

Allow downloading items with curl #470

@migmartri

Description

@migmartri

To download an artifact from CAS, in addition to being able to do it with the CLI, you can use the /download HTTP endpoint in the control-plane.

If you open the link below in your browser you'll get redirected and the download will start.

https://cp.chainloop.dev/download/sha256:744ffb7e09fca615818a151745ef872903ae79880f966efb805da736369b1d98

but that's not the case if you use curl and authenticate with an API token (new feature #461)

curl -L -H "Authorization: Bearer $API_TOKEN" https://cp.chainloop.dev/download/sha256:744ffb7e09fca615818a151745ef872903ae79880f966efb805da736369b1d98

The result of running that is a mere Your download will begin shortly... but does not redirect and hence the download process never starts.

It's likely that the issue is related to the use of meta-redirect headers, a feature potentially not supported by clients like curl.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions