upload_file_from_url
Fetch a public image URL, validate it, and store it for use in Wallet pass templates, returning a file ID for image fields.
Instructions
Fetch a public image URL, validate it, and store it in Walletap-managed storage. Returns a file_… id you can reference inside a template's pass design as { "fileId": "file_…" } on any image field (logo, hero, icon, strip, background, stamp, thumbnail). When purpose is supplied the server generates 1×/2×/3× variants at Apple Wallet spec dimensions. Max source size 10 MiB. Accepts PNG, JPEG, WebP, SVG, AVIF, HEIC, GIF, TIFF and ICO; anything with a wallet purpose is transcoded to PNG. Source URLs that resolve to private / loopback IPs are refused (SSRF protection).
USE A URL YOU HAVE ACTUALLY SEEN — one the user gave you, or one you read out of the page you fetched. Do not construct a plausible-looking asset URL from a brand name: guessed Wikimedia and logo-CDN paths are the single most common cause of failure here. If the fetch reports that the source returned 404, the URL is wrong — find a different one rather than retrying, and ask the user for the image if you cannot.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Public HTTP(S) URL of the source image. | |
| purpose | No | Drives server-side resizing presets. Use template_logo / template_hero / etc. Omit to store the original as-is with no variants. | |
| templateId | No | Optional — scope this file to a template for organization. |