Reference
Files and assets
Overview
Your agent can work with the files behind your StoreFront, the same files the admin's File Manager shows. It can upload images and other media, write CSS and JSON files, search and read files, and restore an earlier version of any file that still exists.
- Assets: images (
.jpg,.jpeg,.png,.gif,.webp,.avif,.svg), video (.mp4,.webm,.mov), fonts (.woff,.woff2,.ttf,.otf,.eot) and PDFs. - Text files:
.jsonand.cssfiles, such as a survey definition or a theme'soverride.css. - Scripts and templates:
.jsand.mjsscripts, and.vmand.htmltemplates inside a theme, which UltraCart reviews and you approve before they are written. - History: every file write saves a new version, and any version can be read and restored.
Example requests
- "Upload these four product photos to the outerwear folder and use them in the new landing page."
- "Add a CSS rule to override.css on the inactive theme that tightens the footer spacing."
- "Show me the last five versions of the header container, and restore the one from before yesterday's change."
Commands
| Command | What it does |
|---|---|
sf files list, get, search, download | List a folder, read a text file or an earlier version, search by name or content, save a file's exact bytes |
sf files upload | Upload an image, video, font or PDF |
sf files put | Write a .json or .css file, or a reviewed and approved script or template |
sf files validate | Check a theme JSON file offline |
sf files versions, sf files revert | List a file's history and restore an earlier version as a new version |
sf files delete | Delete one file, with your approval |
Live changes
Every sf files put needs --live, even for a file in an inactive theme. A file in the active theme, or outside every theme, also needs publish permission. A CSS file that contains Velocity is refused.
What it cannot do
- Restore a deleted file. File history ends when the file is deleted, so keep a separate copy before deleting.
- Upload other file types.
sf files uploadtakes only the media types listed above;.cjsoncontent goes throughsf push.
What needs approval
- Deleting a file with
sf files delete. - Writing a script (
sf files put --allow-script) or restoring one withsf files revert, after UltraCart reviews it, with a fresh authenticator code each time. - Writing or restoring a template (
--allow-template), after UltraCart reviews it, with a fresh authenticator code each time.
See Changes that need approval.
Related documentation
- File Manager: files in the admin
- Pages and themes: theme containers and templates
- Surveys: survey JSON files
Was this page helpful?