Closed lepetitpaco closed 5 years ago
The method you're using there should always return a string for the new filename. If you want to check if the file already exists, you should do this before starting the download.
Depending on the platform, the method you assign to PathNameForDownloadedFile
is either called before or after the download actually starts, but in both cases it will overwrite a file already existing at the given path.
@lepetitpaco if this answered your question, please close the issue. I'll close it after 30 days without response.
I have issues checking if file exists, in main activity my code is
If the file doesn't exist, the file is going to download where I want it to be, so alright on that part.
If the file exists, it is going to download my file but it's going to be named like file-15.mp4 or file-30.mp4, always a random number. And I don't want it to download if file does exist.
Thanks for any help you might be able to give.