kipp icon indicating copy to clipboard operation
kipp copied to clipboard

Delete files

Open uhthomas opened this issue 3 years ago • 2 comments

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.

uhthomas avatar Oct 09 '20 23:10 uhthomas

Continuing from this - the cookie solution seems kind of nice, as path attributes can be specified.

uhthomas avatar Oct 09 '20 23:10 uhthomas

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.

uhthomas avatar Dec 04 '20 15:12 uhthomas