Skip to content

api/images/download: allow image download with a different name #90

Description

@rgl

with bootimus 0.1.70, we can download images as:

# see https://github.com/rgl/windows-evaluation-isos-scraper/tree/main/data
curl --silent -X POST http://localhost:8081/api/images/download -H "Authorization: Bearer ..." -H "Content-Type: application/json" -d '{
  "url": "https://software-static.download.prss.microsoft.com/sg/download/888969d5-f34g-4e03-ac9d-1f9786c66749/SERVER_EVAL_x64FRE_en-us.iso",
  "description": "Windows Server 2022"
}'

but that means the image will be known as SERVER_EVAL_x64FRE_en-us.iso, which is an odd name for a dist filename.

so please add support for setting the filename to which this will download into.

for example, this would look like:

# see https://github.com/rgl/windows-evaluation-isos-scraper/tree/main/data
curl --silent -X POST http://localhost:8081/api/images/download -H "Authorization: Bearer ..." -H "Content-Type: application/json" -d '{
  "url": "https://software-static.download.prss.microsoft.com/sg/download/888969d5-f34g-4e03-ac9d-1f9786c66749/SERVER_EVAL_x64FRE_en-us.iso",
  "filename": "windows-server-2022-amd64.iso",
  "description": "Windows Server 2022"
}'

PS this is also useful for naming the Alma Linux ISO as-in http://mirrors.ptisp.pt/almalinux/10/BaseOS/x86_64/os/images/boot.iso

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions