smanikandan14 / ThinDownloadManager

To download files and to avoid using DOWNLOAD_WITHOUT_NOTIFICATION permission if you are using Android's DownloadManager in your apps.
Apache License 2.0
783 stars 185 forks source link

requested range not satisfiable #135

Open azizmalik406 opened 4 years ago

azizmalik406 commented 4 years ago

am using this library to download videos from recyclerview ,whenever i download any video it download it but when try to download other from recycler than it throw error requested range not satisfiable

vad-zuev commented 3 years ago

I can confirm I'm also getting this error for random files. Never met a HTTP 416 before... weird stuff. Anyone any idea why it suddenly started happening? It seems this project has not been updated for years and worked just fine.

imandaliya commented 4 months ago

this issue happened because of file is already exist in destination path, to solve issue first delete existed file

val outputFile = File(filesDir, filename).apply { if(exists()) delete() }
val destinationUri = Uri.fromFile(outputFile)