Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Automatic removal of downloaded files and local storage clean up #4175

Closed
14 tasks done
jesmrec opened this issue Oct 2, 2023 · 1 comment · Fixed by #4320
Closed
14 tasks done

Comments

@jesmrec
Copy link
Collaborator

jesmrec commented Oct 2, 2023

EPIC:

Context: #4002 (comment)

New option in Settings to remove automatically all the downloaded and temporal stuff from the local storage. Where to place? i'd go for the Advanced section. Option called Delete local copies, that will display the proper options.

Proposal:

  • never
  • 1 hour
  • 12 hours
  • 1 day
  • 30 days

The way to display could be an slider like in iOS, but other options are also valid, f. ex. something similar to the Security > Lock application option.

A worker will run with the given frequency and will delete those files which last_usage date is older than the given time. This is only an approach (any ideas to improve?). Removing tmp and failed uploads as well.

  • Check frequency of the worker (¿¿1 hour??)
  • Check if feasible to check if file is being previewed (to avoid being deleted while previewing)

iOS style (right screenshot): #4002 (comment)

TASKS

  • Research (if needed)
  • Create branch feature/automatic_removal_downloaded_files_local_storage_clean_up
  • Development tasks
    • Retrieve files that need to be removed (from ALL the accounts)
    • Create UseCase to retrieve files
    • Implement logic to clean temporal folder
    • Create worker to remove the previous retrieved files and check it works
    • Create new preference "delete unused local copies"
    • Manage changes of this preference (kill worker if necessary, create a new one, etc.)
    • Create tests
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch feature/feature_name into master
@JuancaG05
Copy link
Collaborator

/tmp directory contains on the one hand temporal files related to uploads (which we shouldn't remove in case they're failed uploads, more info: #4320 (comment)), and temporal files related to downloads. For this issue we'll just deal with downloaded files, not the /tmp directory, we'll research more about this in another issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment