eikek / sharry

Sharry is a self-hosted file sharing web application.
https://eikek.github.io/sharry
GNU General Public License v3.0
862 stars 54 forks source link

[feature request] Delete old files #1269

Open albertbern opened 9 months ago

albertbern commented 9 months ago

Is there a way to delete old files from all accounts?

I have an organisation and organisation users will get their large files ( huge ) via alias share links. They will download them and always forget to delete files to free space. I use maria db and filesystem as storage.

I want to delete files, e.g. older than 1 week. But alias share links should live forever so 3rd party could upload new files regularly.

I can use API to delete only my admin account files now, because i can`t see other users files (

Or can I somehow make old files orphaned?

albertbern commented 9 months ago

I have wrote script: created in DB stubby share for my account , changed old files share to this stubby share and deleted stubby share via API. Not an elegant solution.

eikek commented 9 months ago

Currently there is no easy way to do it, unfortunately. Files uploaded via aliases are not expiring unless published. I think this script you wrote is a good way for now.