-
-
Notifications
You must be signed in to change notification settings - Fork 261
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] File expiration #30
Comments
I'm not sure I'm fond of the idea. I can see it being useful in the scenario you depicted, but it would take a revamp of the frontend prompting the user if the files should expire or not. I'll think about it and let you know in a few days. Thanks for the suggestion! |
it would benefit safe.moe extremely |
who dat |
I wasn't really thinking of a per-file option, actually, though that could be useful. I'd personally get more use out of a global setting that applies to all uploads, which at least saves you the trouble of the UI redesign. |
You can just set this up as a cron on the server itself:
This will delete all files that have not been accessed in over 30 days, not including those that are exactly 30 days. Edit: Just realized that this would also delete thumbnail images if you don't go into the thumbnail view... would not recommend doing this ^^; |
@RyoshiKayo That wouldn't clean the database references to those files. While it would solve the immediate issue of storage space, it is a hamfisted method. |
yeah you'd need a check script rather then trying to tie it all into one cronjob, sql will be needed to drop the data also isnt too hard to do tbh |
This should also apply to album links |
BobbyWibowo's fork has Cloudflare purge and file expiry cleanup implemented but the fork is still on V3 so I'm not sure how well it'd be able to translate to V4 Lack of this functionality is a major blocker for my own image host to migrate to V4 https://github.com/BobbyWibowo/lolisafe/blob/safe.fiery.me/controllers/utilsController.js#L513 and some relevant scripts |
Definitely something to look forward to, that's super useful |
Added File Expiry with #307 Design decisions will need to be made though between:
Have to choose which of these is the lesser evil. For most people I imagine higher db ops is fine, as it's only them or a few people using it, but for a larger host with constant file uploads / short expiry times, it would put a fair amount of load on the db. IMO option 2 with db ops being higher is the way to go, but it's inefficient. Open to other opinions. Can be very much extended with cache purge support, parse duration support for non "day" lengths etc. But this is a good starting point at least :) |
It would be nice to be able to configure automatic file deletion, to use lolisafe as a temporary uploader or save on disk space.
The usual way of doing it is "delete after X days", but it could also be useful to have files delete themselves after X days of not being accessed, so that frequently accessed files aren't suddenly pulled down.
The text was updated successfully, but these errors were encountered: