Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Delete old files #105

Open
ovv opened this issue May 1, 2018 · 3 comments
Open

Delete old files #105

ovv opened this issue May 1, 2018 · 3 comments

Comments

@ovv
Copy link
Member

ovv commented May 1, 2018

Slack as set a usage limit on the number of files for slack teams. We should monitor that and delete the old ones that are inactive so we don't get a warning when uploading new files

@dangarthwaite
Copy link

I don't see anywhere in the API to mine slack for "unused" or "last seen/downloaded" files that might be used to define "inactive".

@mattrasband
Copy link
Contributor

@dangarthwaite I think you probably need a combination of files.list and files.info. The latter has a "created" key that should give a pretty good indication, since we go through the history limit in 4-6 days usually. Anything older than a week is definitely a removal candidate.

@mattrasband
Copy link
Contributor

mattrasband commented Oct 3, 2018

Actually the files.list has a parameter ts_to, so you could just ask for all files before now - 1 week, and delete them (maybe only allowing that for files in public channels).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants