Managing Transformed Files
By default, RNVideoEditor stores all transformed files and images in the app's cache directory. This ensures that the transformed files are available for use within the app but are subject to removal if the user uninstalls the app or clears the app's cache.
If you wish to retain these transformed files or upload them to your server !
Default Storage Behavior
- Transformed files are stored in the app's cache directory.
- Files remain available as long as the app is un-installed or the cache is not cleared.
- Files are accessible within the app for various purposes.
Deleting Transformed Files
To delete all the transformed files generated by the transformations, we provide a convenient method: flushCache()
. This method allows you to clear the cache and remove all the cached files.
flushCache()
The flushCache()
method is used to delete all cache files generated by the transformations.
This can be useful if you want to reclaim storage space or remove unnecessary cached files.
Usage Example
import { flushCache } from 'rnvideoeditor';
const clearCachedFiles = async () => {
try {
await flushCache();
console.log('all cached files cleared');
} catch (error) {
console.log('Error while deleting cached files', error);
}
};
Note: This method will only delete the cache files generated by the Rnvideoeditor