781flyingdutchman/background_downloader

ICloud Backup - Opt Out

Closed this issue · 3 comments

Hey @781flyingdutchman ,

I’d like to request a feature to exclude specific files, such as downloaded content, from iCloud backups. Currently, iOS provides an option to mark files so they are not backed up to iCloud, which can be especially beneficial for managing storage and backup sizes effectively, as detailed in this guide.

Thank you for considering this request!

Best regards,

Thanks for your suggestion. There are two ways we could do this:

  1. Add another property to the DownloadTask object so that this gets done immediately upon download
  2. Add a method to the FileDownloader to set/reset that flag on a path you specify
  3. Add a .configure option to set this "globally" for all downloads on iOS

The disadvantage of 1) is that it adds yet another property to what is already a long list and makes the roundtrip via JSON encoding/decoding for every update (although I am working on a TaskOptions object that we could use for this lesser-used option, which would limit this impact)
The disadvantage of 2) is that it is after the fact and "manual", so iCloud could trigger the backup before you have set the flag. However, this could be mitigated by the developer by creating a subdirectory on which this flag is set via the method, and ensuring downloads go in that subdirectory.
The disadvantage of 3) is that you lose the option to set it differently for different downloads - but it does get applied immediately upon download.

I think my preference is doing both 2 and 3. Let me know what you think.

Implemented config option in V8.8.0

Option 2:3 sound great.

Thanks for such a speedy turn around!