File Upload Configuration
Used to configure upload limits and attachment deletion callbacks in Umo Editor Mobile.
Compared with Umo Editor and Umo Editor Next, mobile places more emphasis on “previewing or playing the uploaded resource inside the current container”, and does not support the generic third-party URL-based preview approach described in the desktop documentation. Different on Mobile
Default Configuration
{
file: {
allowedMimeTypes: [],
maxSize: 1024 * 1024 * 100,
},
}Configuration Items
file.allowedMimeTypes
Description: the list of allowed MIME types for upload. An empty array means no type restriction.
Type: Array
Default: []
Optional values: valid MIME types
Additional notes:
- To allow an entire category of files, you can use values such as
image/*,audio/*, andvideo/*. - Whether mobile file nodes, images, audio, or video uploads ultimately succeed also depends on the business implementation of
onFileUpload.
file.maxSize
Description: the maximum allowed upload size, in bytes (B).
Type: Number
Default: 1024 * 1024 * 100 (100M)
file.preview
Description: file preview configuration.
Type: Array
Default: no built-in default value
file.preview can still be configured, but the mobile default configuration does not include the desktop third-party document-preview URL templates. Preview fallback for document attachments must currently be handled by business code. Support for file.preview-based preview on mobile may be considered in the future. Different on Mobile
Key Differences from Desktop
file.previewDifferent on Mobile: mobile currently does not support the desktop-style third-party URL-based preview capability.
Related Business Callbacks
File-related configuration ultimately works together with the following callbacks:
onFileUpload(file): uploads a file and returns the server resultonFileDelete(id, url, type): deletes a file or attachment resource
For more details about callback contracts, see Method Configuration.