We need to add a delete button for map requests to trigger two actions:
Delete the map request from the database. This is straightforward in map-packer; we can extend the backend to handle this.
if status: SUCCESSFUL, also delete the file in storage. The user should be prompted by a warning modal about the implications of not being able to access the file again, as it will be permanently deleted.
Currently, MapPacker has no access to file storage, so this deletion might need to occur via a queue message received by mapgl-tile-renderer, which would check the provided filename and delete the corresponding file from storage (volume mount). @IamJeffG - thoughts on this?
One possible edge case is if the user deletes a map request with status: PENDING, and no file has been created yet, which could result in mapgl-tile-render producing an orphaned file. However, if we eventually mark all status: PENDING as failed after a reasonable timeframe (see proposed issue https://github.com/ConservationMetrics/map-packer/issues/19) then we can avoid this by only allowing the user to delete map requests with SUCCESSFUL or FAILED statuses.
We need to add a delete button for map requests to trigger two actions:
status: SUCCESSFUL
, also delete the file in storage. The user should be prompted by a warning modal about the implications of not being able to access the file again, as it will be permanently deleted.Currently, MapPacker has no access to file storage, so this deletion might need to occur via a queue message received by mapgl-tile-renderer, which would check the provided filename and delete the corresponding file from storage (volume mount). @IamJeffG - thoughts on this?
One possible edge case is if the user deletes a map request with
status: PENDING
, and no file has been created yet, which could result in mapgl-tile-render producing an orphaned file. However, if we eventually mark allstatus: PENDING
as failed after a reasonable timeframe (see proposed issue https://github.com/ConservationMetrics/map-packer/issues/19) then we can avoid this by only allowing the user to delete map requests withSUCCESSFUL
orFAILED
statuses.