Open hundredball opened 7 months ago
The solution is to add imagePath
in observation and it can be used to directly delete image in Firebase Storage.
We delete observation record in CloudStore first and then image in Storage. Even though the image deletion fails, error won't occur on the user's side because they cannot access the reference to the image anymore. Regular database cleaning to remove images without reference would be needed.
After pressing
Delete
in observation page, both observation record and image should be deleted. However, only observation record is deleted now.