File Value Field Types
Image, video, file, and audio fields use dataType: 'array'. The stored array contains file asset references.
| Field Type | Stored Value |
|---|---|
| Image | Array of image file references |
| Video | Array of video file references |
| File | Array of file references |
| Audio | Array of audio file references |
Use context.file.resolve when the script needs full file asset details.
const attachmentIds = Array.isArray(record.data.attachments)
? record.data.attachments.map((item) => String(item)).filter(Boolean)
: [];
const files = await context.file.resolve({
fileIds: attachmentIds,
});
Resolved file assets include the original file URL and, when available, a preview URL. Preview support is narrower than upload support: a file can be valid for upload and download even when Soln cannot preview it.
Use file.previewUrl || file.url only when a script needs a display URL. previewUrl is returned for file types that the current preview viewer supports, such as common images, PDFs, text/code files, and common audio/video files. Unsupported formats such as archives, complex media files, design/CAD/model files, and columnar data files may have previewUrl: null; use file.url for download or external handling.