dm-172
This commit is contained in:
parent
9713d707e2
commit
7e8f361212
1 changed files with 2 additions and 1 deletions
|
|
@ -474,7 +474,8 @@ class ChatRoomsRepository @Inject constructor(
|
|||
}
|
||||
|
||||
val totalBytes = body.contentLength()
|
||||
val targetDirectory = context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS) ?: context.cacheDir
|
||||
// 🎯 修正後的寫法:直接存入手機系統的公共 Download 資料夾
|
||||
val targetDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)
|
||||
val targetFile = File(targetDirectory, fileName)
|
||||
Log.d("ChatDebug", "📊 檔案總大小: $totalBytes bytes, 儲存路徑: ${targetFile.absolutePath}")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue