kipp
kipp copied to clipboard
Delete files
Kipp does not currently expose any mechanism to request the deletion of files, which is a problem. The hard part is figuring out how to distribute deletion keys, as browsers don't allow the interception of redirects (which is how Kipp handles responses to uploads). A few ideas have come to mind:
- Providing a key in the request.
- Using cookies (which would fix the redirect problem).
- Using authorization headers.
I don't want to get into a situation where keys aren't rotated, or get leaked however.
Continuing from this - the cookie solution seems kind of nice, as path attributes can be specified.
There is a second part to this, and that's cleaning up files. Kipp used to delete files by using an interval for which the database would be queried for expired files, and they would be removed from the database and storage. This is not scalable, and so had been removed, and currently files are stored forever (even if the database enforced a fixed TTL).
I believe the best way to approach this would be using a message queue.