Upload from URL
Upload from URL
Upload a file from an existing URL.
POST
Upload from URL
Fetch a remote URL and store the result as a PostQueen media asset. Useful when your media already lives on a CDN or external storage and you do not want to round-trip it through your client.
Response shape matches Upload File.
Requirements for the source URL
- Must be reachable from the PostQueen backend (publicly resolvable HTTPS, no auth required).
- The URL path, ignoring any query string, must end in
.png,.jpg,.jpeg,.gif,.webpor.mp4. This is checked before the fetch, so AVIF, BMP and TIFF cannot be pulled from a URL at all even though Upload File accepts them. - The downloaded bytes are then sniffed and must also land in that same allowlist.
- PostQueen performs an SSRF-safe fetch: private IP ranges, link-local addresses, and
localhostare rejected.
Example
When to prefer multipart upload
If your source URLs are slow or unreliable, the round-trip through PostQueen can fail or take a long time. For best results:- Cache stable, fast HTTPS source URLs, such as S3, R2 or Cloudflare Images.
- For one-off uploads, pre-download the file locally and POST it to
/public/v1/uploadinstead. - Do not link to signed URLs that may expire before PostQueen fetches them.
Authorizations
Your PostQueen API key
Body
application/json
URL of the file to upload
Response
200 - application/json
File uploaded successfully