Abilities

Add Media from URL

lh-add-media-from-url/add-media-from-url

Fetches a remote file by URL and adds it to the WordPress media library. Requires upload_files; main site only.

ParameterTypeRequiredDefaultDescription
urlstringYesThe remote file URL to fetch.
post_idintegerNoOptional post to attach the media to.
descstringNoOptional attachment description.
task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.