Skip to content

Use date of upload instead of modification date to see if the file should be deleted #23

@js94x

Description

@js94x

Steps to reproduce

  1. upload a file with a modification date before 2014 using desktop client for windows
  2. tag file with simple tag (e.g. "File") or use automated tagging
  3. set up a retention rule to delete files tagged with "File" after 10 days
  4. run cron.php from command line

Actual behaviour

The app uses modification date (could be years in the past) to decide whether the file should be deleted.

Expected behaviour

The Retentition app should note the upload date in Nextcloud instead of the modification date that was transferred from the desktop client. After my research in the database table oc_filecache, I have not found a field for the upload date.

Maybe you could use a hook in the retention app to perform a separate database entry which contains the date of the upload. If a extra field exists, you could decice in the preferences which date is used as criterium.

This background is as follows: I would like to use Nextcloud as a platform for temporary file exchange for friends, customers and others. Uploaded files should be deleted after x Days. But everytime I upload an older file from windows in the shared folder, the retention app would delete it after 24 hours at the latest.

Server configuration

Nextcloud version: 11.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions