The preferred method for making files available offline is through HTML tag processing. See these articles to learn how to implement it:
- Making an Image Available Offline
- Making a File Link Available Offline
- Processing HTML Elements
- Configuring HTML Attributes
For cases unsupported by HTML processing, use the low-level offline file API:
In both cases, you can offline-enable files stored in Telerik Platform as well as external files from third-party providers.
This article is organized as follows:
As described in Initializing Offline Mode, when initializing the Everlive instance you can optionally specify where your offline files go.
Offline files always use the file system provider because of their large expected size, but you can specify the file paths as follows:
offline.files.storagePath—Specifies where file content is stored. Default value:
offline.files.metaPath—Specifies where file mapping data is stored. Default value:
For Hybrid apps ensure that the Cordova File plug-in is enabled.
All file operations are synchronized to the cloud whenever synchronization is invoked, similarly to other data operations. It is worth noting that file content is also synchronized, which may take significant time to complete.
If you use the Custom conflict resolution strategy, you are limited to using either the server item or the client item. You cannot use a custom item.
See Data Synchronization in Offline Mode for details.
As mentioned in Data Security in Offline Support, offline files are not encrypted with the rest of the content type data.
If file encryption is important for your app, advise your users to enable the device's built-in file system encryption (if any).
Have these in mind when working with file offline:
- Offline Support for files is currently available only in Cordova and Node.js applications. NativeScript is not supported.
- Offline files are always stored on the file system, even if another provider is selected for content types using the
- The operations of downloading and synchronizing a file may take a long time, depending on the size of the file. It is recommended to download offline only files that are really needed.
- Because offline files require the
fileSystemstorage provider you cannot test the feature on web apps and web-based device simulators. The AppBuilder desktop device simulators support the