arrowheadapps / strapi-connector-firestore

Strapi database connector for Firestore database on Google Cloud Platform.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot delete medias

loicmarie opened this issue · comments

When deleting a media, the media files are deleted in storage, but the related firestore document is not removed. It seems it occurs even when the image has no dependency attached to it (i.e is not used anywhere in Strapi)

After manually deleting the firestore docs, it works fine.

The Strapi-side error is:
Error: Operations are not supported on component collections. This connector embeds components directly into the parent document.

Thank you for this amazing work ! I was so excited when I saw someone finally built a Strapi Firestore connector 🚀

Thanks for the report! I'll take a look and come back to you as soon as I can.

@loicmarie I can't seem to reproduce this with Strapi version 3.5.2, and strapi-provider-upload-google-cloud-storage@3.4.6.

When uploading and deleting files via the media library plugin, files are deleted in Google Cloud Storage, and the database entry is also deleted in Firestore.

Are you deleting via the Media Plugin or via some other API?

@loicmarie as mentioned before, I can't reproduce this. Can you provide feedback to my question about what API endpoint you are using to delete? Or have you resolved this now?

Thanks 😄

Oh I am sorry for this very delayed response ! I was in a rush this week... I just tried to create a minimal repro but I finally could not reproduce it, so I will close this. The time I was working on it, I had a pretty bad internet connection... Are the writes made with transactions in Firestore ? Sorry for the inconvenience

@loicmarie no worries, feel free to reopen or create another issue if you find anything else. I appreciate the feedback!