bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 57 forks source link

Create UI: delete any uploaded documents when cancelling a filing #21109

Open severinbeauvais opened 2 weeks ago

severinbeauvais commented 2 weeks ago

In Create UI, there are a few places where a document can be uploaded. This creates a key in Legal API and stores the document in Minio db.

However, if the filing is cancelled (before being saved), no cleanup is done -- the documents are orphaned.

This ticket is to add code to issue delete commands to delete any documents that were uploaded, when the filing is cancelled.

(I believe that Legal API deletes any documents it's aware of if the filing is deleted. In the scenario above, the filing was not saved so the Legal API doesn't know about any new documents.)

severinbeauvais commented 2 weeks ago

@OlgaPotiagalova Please tag this to the appropriate epic. Thanks!

severinbeauvais commented 1 week ago

@vysakh-menon-aot The UIs currently don't know what API calls to make to delete the presigned url and the file on Minio. Do you have any information on that to add here?