Upload from a URL
Have PostQueen fetch an image or video from a public HTTPS URL into the media library.
id and path on the post.
What the URL must be
- A public
https://URL that needs no sign-in. Plainhttpis refused. - Its path, without the query string, ends in
.png,.jpg,.jpeg,.gif,.webpor.mp4. AVIF, BMP, TIFF and MOV files cannot be fetched this way; send them to Upload a file. - It does not point at a private, local or internal address. PostQueen checks the address again when it connects.
How the file is fetched
PostQueen streams the file to storage, up to 1 GB and for at most 5 minutes. A server that declares a larger file is refused before the download starts. Once the file is in, PostQueen reads its type from the bytes, so a.png URL that serves an HTML page fails with Unsupported file type. A video comes back processing, as an upload does: poll Get media status before you post it.
If it fails
Authorizations
Your API key from Connections > API Keys, or an OAuth access token (pos_...). Send it as it is, with no Bearer prefix.
Body
URL of the file to upload
Response
Stored
Unique file ID
Stored file name
The name the file was uploaded under
URL of the stored file. Send it with id as a post's media
Thumbnail URL, set for video
Alt text, when one was set
A video (MP4 or MOV) is normalized in the background and starts as processing; poll GET /media/{id}/status until it is ready before you put it on a post. Images are ready at once.
ready, processing, failed