Skip to main content
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: .json and .css files, such as a survey definition or a theme's override.css.
  • Scripts and templates: .js and .mjs scripts, and .vm and .html templates 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​

CommandWhat it does
sf files list, get, search, downloadList a folder, read a text file or an earlier version, search by name or content, save a file's exact bytes
sf files uploadUpload an image, video, font or PDF
sf files putWrite a .json or .css file, or a reviewed and approved script or template
sf files validateCheck a theme JSON file offline
sf files versions, sf files revertList a file's history and restore an earlier version as a new version
sf files deleteDelete 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 upload takes only the media types listed above; .cjson content goes through sf push.

What needs approval​

  • Deleting a file with sf files delete.
  • Writing a script (sf files put --allow-script) or restoring one with sf 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.

Was this page helpful?