Back

Query User Files

  • 0
  • Users
  • Flutter
  • Storage
hamed
27 Apr, 2023, 18:50

In my situation, I'm using a relationship between two documents with the 'Cascade - delete all...' option. The issue here is that a document would be deleted, but its related files would still be in storage, and I couldn't find any endpoint to query these files for deletion.

TL;DR
Currently, there is no workaround or solution available for querying and deleting related files when a document is deleted. The support team suggests upvoting the issue on GitHub to stay updated on future developments (link provided in the conversation).
Drake
27 Apr, 2023, 19:04

Your data is structured like this?

TypeScript
A -> B -> File

And you're deleting A which automatically deletes B?

hamed
27 Apr, 2023, 19:10

Yes,

Drake
27 Apr, 2023, 19:15

Ideally, when B is deleted, an event would be fired so that you can have a function that executes and deletes the files. Right now, it doesn't. We plan to add this in the future. you can upvote this issue to stay updated on this: https://github.com/appwrite/appwrite/issues/5375

hamed
27 Apr, 2023, 19:16

Alright

hamed
27 Apr, 2023, 19:19

Any solution for now?

Drake
27 Apr, 2023, 19:19

no workaround at the moment

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more