What it does
Delete one uploaded file from the draft. Pages that still link /files/name get a 404 for it after publish.
Plans
Works on every plan: Free, Basic, Pro and Ultra.
Parameters
| Name | Type | About |
|---|---|---|
site_idrequired | string | The id of the site. list_sites gives the ids of your sites. |
namerequired | string | The uploaded file to remove, such as logo.png. |
message | string | A short note for the version history, like a commit message. |
verbose | boolean | true lists every file and page of the draft. Otherwise the response lists only what this call changed, plus draft totals. |
Example
Call delete_file with these arguments:
{
"site_id": "01a1…",
"name": "logo.png"
}
Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.
Related guides
- Images, fonts, PDFs and videoUpload files and use them on your pages.