Store an image for an article
POST
https://api.usecommune.com/articles/{article}/images
Production. There is no separate sandbox host.
{var_value}
Store an image for an article
Stores an image for this article and answers with the URL it is served
at, so whatever writes the article never needs somewhere of its own
to host one. Needs content: write.
Two ways in, chosen by the body:
source_url: Commune downloads the image and stores a copy. For an image you hold as a link, including a generated one on a link that will expire. It has to be a public http or https URL on the standard port; private and local network addresses are refused, redirects included.content_type: Commune answers with a one-timeuploadURL and the image's finalurl.PUTthe file's bytes toupload.urlwith theupload.headers, beforeupload.expires_at. The bytes go straight to storage, so a file on disk never has to pass through a model or through this API. Until the upload is made,urlanswers404.
Either way the image is a JPEG, PNG, WebP or GIF of at most 10MB, and
the article itself is not changed: put the url in the body's
Markdown () or in image_url with Update an article
(PATCH /articles/{article}).
Authentication: 
POST
/articles/{article}/images
Loading...
Response
Waiting for a request to be sent.