Replies: 3 comments 2 replies
-
Basically when file picker picks a file, it caches it in the app files in case that file is deleted from your storage. So maybe even if you can just pull the path using filepicker and not actually use it for loading the file itself. Might require more cross platform code, IDK, trying to be helpful. |
Beta Was this translation helpful? Give feedback.
-
There's also a deleteOnExit() mathod that could be used to mark the file for deletion when the app closes. If you want to delete a temporary file when the app is closed, you can use the // Mark the temporary file to be deleted on exit
tempFile.deleteOnExit(); This way, you can ensure that the temporary file is deleted when the app is closed, regardless of how the app is closed. However, you should also be aware of the drawbacks of using the |
Beta Was this translation helpful? Give feedback.
-
Ill look into it, that caching issue youre referring to is an old one i think ive fixed now but i think theres a new one causing the app to crash. |
Beta Was this translation helpful? Give feedback.
-
According to one of the web search results I found, you can use the clearTemporaryFiles() method from the file picker plugin to remove the cached files on Android. Alternatively, you can use a version of the file picker plugin below 2.0.0, which does not cache the files by default. However, this may also affect the functionality and compatibility of the plugin, so you should be careful when choosing the version. Another possible solution is to delete the cache directory manually before picking the files, as suggested by another web search result. However, this may also delete other files that are not related to the file picker, so you should be careful when doing this.
TL:DR - Use clearTemporaryFiles() method when starting a new convo and recache the model file again if nessecary. This might take longer to load but it would keep your storage from maxing out.
Beta Was this translation helpful? Give feedback.
All reactions