joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.8k stars 767 forks source link

How to fix the downloaded file name or overwrite historical downloads #837

Open 337077418 opened 1 year ago

337077418 commented 1 year ago

Hello, I have encountered a problem. When I update the app using RNFetchBlob, the update file update.apk will always increase update1.apk-update2.apk, update3.apk, resulting in

then(res => {

android.actionViewIntent(

res.path(),

'application/vnd.android.package-archive'

)

}The address of res. path () is always incorrect because the download file update.apk has changed to update2.apk, resulting in a bug: package parsing error

How to always fix the downloaded APK file to update.apk

I have tried to add a timestamp. apk when android.actionViewIntent cannot pop up the installation interface

Samsung Mobile Android 12

337077418 commented 1 year ago

have already been solved