hholzgra / maposmatic

Mirror of maposmatic repository at savannah.nongnu.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add retention options for upload files

hholzgra opened this issue · comments

Currently uploaded GPX, Umap and GeoJson files are kept "forever" and there is no detention policy regarding these, just a warning on the upload form.

This is meant to allow re-rendering map jobs with attached files at a later date.

Users should have more control over this, at a minimum they should be able to decide whether uploaded files should be kept at all, or be removed right after rending (which would obviously make re-render requests impossible for these jobs)

See also issue #90

Basic "delete after rendering" processing added.

Properly populating the "keep_until" field and removing upload files older than that as part of regular cleanup runs still needs to be implemented

Added "brute force" cleanup code for files beyond their end-of-life date.

For now it will try to re-delete already deleted files again and again, need to add an extra "deleted_already" column to the upload files table model ...

Retention infrastructure is implemented now, web front end users are given a choice whether uploaded files should be kept (with max. lifetime globally configurable), or deleted right after processing the render request.

Still missing:

  • maybe give front end users more control on how long to keep a file
  • add API option to pass "delete-after-use" and/or max. upload file life time

Closing as API work now has separate ticket #118