Creator Files Assets tree with pages folder HTML and media
Files / Assets tree
Creator workspace with Assets list and Code editor open on a page file
Files + Code workspace

Appifio Creator · Lesson AM04 · API REFERENCE §3 · 7 methods

Site page files & uploads
HTML · images · documents - full structure

Different from the JSON store (AM02-AM03): these are visitor-facing site files (HTML/CSS/JS…) and uploaded assets (images, PDFs…).

Quick contrast: Data store first reads often succeed with empty content · Missing site file → usually success: false.

appifio_readFsFile(filePath) · Public

What it does: Read a site file as a text string.

const r = await appifio_client.appifio_readFsFile('blog/detail.html');
// r.data.content (string), r.data.size, r.data.path

Returns: { data: { content: string, size, path } }. JSON files on the site need your own JSON.parse(content). Missing file → success: false. Max read ~10MB.

appifio_writeFsFile(filePath, content) · Admin+

Parameters: Text only: html, css, js, json, md, txt, xml, csv, svg.

await appifio_client.appifio_writeFsFile('about.html', htmlString);
// also used for backend/functions/functionName.js (AM07)

Returns: { success: true, data: { path, size } }. Creates parent folders. Does not write .php, .htaccess, .env, or binary files.

appifio_deleteFsFile(filePath) · Admin+ (role user blocked)
await appifio_client.appifio_deleteFsFile('blog/old.html');

Returns: { success: true }. Do not delete routes.json with this - use removeRoute (AM05).

appifio_listFsFiles(options?) · Public

Parameters: optional object { path?, recursive? }.

const r = await appifio_client.appifio_listFsFiles({ path: 'blog', recursive: false });
// r.data.files = [...]
appifio_getFsFileInfo(filePath) · Public
const r = await appifio_client.appifio_getFsFileInfo('routes.json');
// data: path, name, size, extension, modified
appifio_uploadImage(file) · Admin+ (any logged-in role)

Parameters: a File from - jpg, jpeg, png, gif, webp, svg · max 10MB.

const r = await appifio_client.appifio_uploadImage(fileInput.files[0]);
const url = r.data.url; // use in 

Returns: { data: { url: "https://…/images/file_xxx.jpg" } } (absolute URL on the site).

appifio_uploadFile(file) · Admin+

Parameters: PDF, DOC, MP3, MP4, ZIP… · max 50MB.

const r = await appifio_client.appifio_uploadFile(file);
// r.data.url (plus related metadata)
§3 checklist: readFsFile · writeFsFile · deleteFsFile · listFsFiles · getFsFileInfo · uploadImage · uploadFile = 7/7

AM05 - Routes (§4 - 3 methods)

Appifio Creator · Method series · AM04