Skip to content

Processor URLDownloader

github-actions edited this page Dec 6, 2022 · 12 revisions

URLDownloader

NOTE: This page is automatically generated by GitHub Actions when a new release is tagged.
Updates to the information on this page should be submitted as pull requests to the AutoPkg repository. Processors are located here.

Description

Downloads a URL to the specified download_dir using curl.

Input Variables

  • url:
    • required: True
    • description: The URL to download.
  • request_headers:
    • required: False
    • description: Optional dictionary of headers to include with the download request.
  • curl_opts:
    • required: False
    • description: Optional array of options to include with the download request.
  • download_dir:
    • required: False
    • description: The directory where the file will be downloaded to. Defaults to RECIPE_CACHE_DIR/downloads.
  • filename:
    • required: False
    • description: Filename to override the URL's tail.
  • prefetch_filename:
    • default: False
    • required: False
    • description: If True, URLDownloader attempts to determine filename from HTTP headers downloaded before the file itself. 'prefetch_filename' overrides 'filename' option. Filename is determined from the first available source of information in this order:
    1. Content-Disposition header
    2. Location header
    3. 'filename' option (if set)
    4. last part of 'url'.
      'prefetch_filename' is useful for URLs with redirects.
  • CHECK_FILESIZE_ONLY:
    • default: False
    • required: False
    • description: If True, a server's ETag and Last-Modified headers will not be checked to verify whether a download is newer than a cached item, and only Content-Length (filesize) will be used. This is useful for cases where a download always redirects to different mirrors, which could cause items to be needlessly re-downloaded. Defaults to False.
  • PKG:
    • required: False
    • description: Local path to the pkg/dmg we'd otherwise download. If provided, the download is skipped and we just use this package or disk image.

Output Variables

  • pathname:
    • description: Path to the downloaded file.
  • last_modified:
    • description: last-modified header for the downloaded item.
  • etag:
    • description: etag header for the downloaded item.
  • download_changed:
    • description: Boolean indicating if the download has changed since the last time it was downloaded.
  • url_downloader_summary_result:
    • description: Description of interesting results.

Table of Contents

Clone this wiki locally