Store a website asset
Hands back a one-time URL to upload a file to, and the permanent address
it will be served at. Needs content: write, and is a write.
For the things a page links to rather than contains: images, video, audio, fonts, and shared stylesheets or scripts. Put their URLs in your HTML; nothing here changes a page.
The bytes go straight from you to storage and never pass through this
API or through a model, so url answers 404 until you have sent them.
Send them with a PUT carrying the Content-Type you named, before
upload.expires_at.
content_type is what the upload is minted for, and storage enforces it
on the PUT itself: a file of a different type is refused there rather
than stored wrongly. image/svg+xml is not accepted, because an SVG
navigated to directly runs its own script on the storage origin, which
every creator's assets share.
Storage not being configured on this deployment answers 503 rather
than accepting a file Commune cannot keep.
Publishes no event.
Loading...
Waiting for a request to be sent.