Upload images
Install the matching @soeditor/file-manager@1.2.1 and register uploadServiceToken per instance. create(request) returns a task with result, cancel and subscribe.
Resolve result with a safe URL and image metadata, reject on failure, cancel the actual request in cancel, and report progress through subscribe.
Client defaults are 25 MB per file and four concurrent uploads. The server still owns authentication, type and size validation, and storage authorization. The demo never transmits the selected file; success returns a bundled image. Run uploads.
Plugins and adapter
Use /cms/optional for external asset plugins in 1.2.1; see the entry limitation.
pnpm add @soeditor/file-manager@1.2.1 @soeditor/presets@1.2.1Preserve the CMS plugins and explicitly add asset plugins before registering services. A service registration alone does not register the image.upload command.
export async function createAssetEditor(host: HTMLElement) {
return createOptionalEditor(host, {
plugins: [...cmsRuntimePreset.plugins, FileManagerPlugin, UploadPlugin],
toolbar: [
'undo',
'redo',
'bold',
'italic',
'image-browse',
'file-link',
],
});
}The complete upload implementation includes tasks, cancellation, failure/retry and HTML output. Success inserts the asset URL; failure keeps existing content and permits retry.
Common errors
For an unregistered command, check UploadPlugin. For a pending upload, check that result settles. Cancel requests and destroy the instance when leaving the page. The mock adapter is not production storage.
Next steps
Examples · Configuration · Troubleshooting
Our best companion: SoFinder
SoFinder is our recommended asset management companion. See the integration guide and example for image, file and video URL workflows, and how the simulated picker differs from a real backend.