Using Files and Assets in Prompts
Appsanic can use files from your account asset library while building an app. In a project composer, select the + button and choose Use an asset.
Inline image attachments and screenshot paste are currently unavailable. A valid image can contain a photographed or screenshotted API key, and file-format checks cannot detect that. Appsanic therefore rejects image message blocks at both the chat API and the AI worker until visual credential screening is available. This is fail-closed: a forged request or an older saved draft cannot bypass the restriction.
Use an account asset
Use an asset when the file should become part of the built app:
- A logo or brand image.
- A custom font.
- A background image or illustration.
- Audio or video included with the app.
The asset library is account-wide. Upload a file once, then reuse it across projects. Selecting an asset adds a chip to the message so the AI receives the exact asset ID instead of guessing from a filename.
Never upload credentials, recovery codes, private keys, or screenshots that contain them as assets. Provider credentials belong only in the encrypted Dashboard → Connectors setup form. A custom runtime backend credential belongs in that backend's secret manager.
Supported asset formats
- Images: PNG, JPEG, SVG, WebP, GIF
- Audio: MP3, WAV, M4A, OGG
- Video: MP4, MOV, WebM
- Fonts: TTF, OTF, WOFF, WOFF2
Assets can be up to 25 MB per file. The picker shows your account's storage use and rejects unsupported or oversized uploads before selection.
Using an asset in a message
After selecting an asset, refer to what you want done:
_"Use [logo-dark.svg] in the header on every screen."_
_"Use [Inter-Variable.ttf] as the body font throughout the app."_
The visible chip identifies the selected file. Remove the chip before sending if that file should not be used on the current turn.
Assets and generated output
Selected assets use authenticated Appsanic delivery while you work. Preview, ZIP export, GitHub push, verification, and publishing copy authorized asset bytes into deterministic paths under assets/appsanic/, so standalone output does not depend on a live Appsanic session.
Troubleshooting
- The + button is not visible. That composer does not have an account asset library attached, or its controls are read-only.
- Unsupported format. Convert the file to one of the formats above.
- File too large. Reduce it below 25 MB.
- I want to show the AI a screenshot. Describe the relevant layout or error in text for now. Do not paste credentials. Inline images will return only after visual credential screening can prevent screenshot-based secret leakage.
Under the hood
- Asset metadata is account-scoped and storage access is enforced with authenticated account checks and Row Level Security.
- A prompt carries selected asset IDs in server-validated metadata; it does not turn an asset into a chat credential field.
- Browser-authored image content blocks are rejected before persistence, and legacy image rows are replaced with a fixed non-secret placeholder before model replay.
Next
Read The Asset Library for folders, permissions, and reuse, or Writing Prompts for concise requests that produce better builds.
