diff --git a/android/MLCChat/app/src/main/java/ai/mlc/mlcchat/AppViewModel.kt b/android/MLCChat/app/src/main/java/ai/mlc/mlcchat/AppViewModel.kt index f51d56ec10..6a760efde3 100644 --- a/android/MLCChat/app/src/main/java/ai/mlc/mlcchat/AppViewModel.kt +++ b/android/MLCChat/app/src/main/java/ai/mlc/mlcchat/AppViewModel.kt @@ -171,7 +171,7 @@ class AppViewModel(application: Application) : AndroidViewModel(application) { val url = URL("${modelUrl}${ModelUrlSuffix}${ModelConfigFilename}") val tempId = UUID.randomUUID().toString() val tempFile = File( - Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), + application.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS), tempId ) url.openStream().use {