Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting observation won't delete image in Firebase Storage #45

Open
hundredball opened this issue Nov 21, 2023 · 1 comment · May be fixed by #46
Open

Deleting observation won't delete image in Firebase Storage #45

hundredball opened this issue Nov 21, 2023 · 1 comment · May be fixed by #46
Assignees
Labels
bug Something isn't working

Comments

@hundredball
Copy link
Collaborator

After pressing Delete in observation page, both observation record and image should be deleted. However, only observation record is deleted now.

@hundredball hundredball added the bug Something isn't working label Nov 21, 2023
@hundredball hundredball self-assigned this Nov 21, 2023
@hundredball
Copy link
Collaborator Author

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.

@hundredball hundredball linked a pull request Jan 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant