Error handling in general is a bit of a mess in pass-ui, but specifically for file deletion, we want to try to handle error cases where the File entity could get into a weird state:
Deletion of the file bytes has to be handled separately from removal of the File (metadata) entity in the database
File entity has a URI reference to the bytes, pointing to where the file service can operate on the file
Getting these two out of sync could be problematic in the Files step, submission review page, or submission details page
Changes
Provide custom File model adapter:
Call to FIle.destroyRecord will delete file bytes via the File Service before calling standard destroyRecord in the Ember store
Could use an eye on error handling.
Error handling in general is a bit of a mess in pass-ui, but specifically for file deletion, we want to try to handle error cases where the File entity could get into a weird state:
Changes
FIle.destroyRecord
will delete file bytes via the File Service before calling standarddestroyRecord
in the Ember storeworkflow-files
component