Using Aktar

Can uploads delete themselves after a while?

Short answer

Yes. Pick Delete after 1, 7, 14 or 30 days next to the destination, and your bucket deletes the file on schedule through a lifecycle rule, even when Aktar isn't running.

Expiring files are uploaded under tmp/1d/, tmp/7d/, tmp/14d/ or tmp/30d/ in front of their usual path. For each of these folders, a lifecycle rule in the bucket (aktar-expire-1d and so on) deletes files once they reach that age. Because the bucket does the deleting, it happens even if your Mac is off or Aktar is uninstalled. The history shows when each file will be deleted.

Delete after becomes available once the bucket has these rules. Choose Set Up Auto-Delete… in the Delete after menu or in the destination's settings, and Aktar adds the four rules while keeping any rules the bucket already has. That needs a key that is allowed to change lifecycle rules:

  • Cloudflare R2: a token with Admin Read & Write. An Object Read & Write token can upload but can't change rules.
  • Amazon S3: s3:GetLifecycleConfiguration and s3:PutLifecycleConfiguration on the bucket.

If your key can't, Aktar lists the rules so you can add them in your provider's dashboard: delete objects with the prefix tmp/1d/ after 1 day, tmp/7d/ after 7 days, tmp/14d/ after 14 days and tmp/30d/ after 30 days. Then click Check Again.

Providers run lifecycle rules in the background, usually once a day, so a file can stay reachable for up to about a day past its date. You can turn auto-delete off per destination and keep or remove the rules. Expiring uploads are in Aktar for Mac 0.5.0 and later, and in the iPhone, iPad and Android apps from 1.1.0.