You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a file should be deleted, the extension updates the data in the files.delete filter (before the action happens).
This is necessary because after deletion the filesize is not available anymore (obviously!)
Problematically the deletion can be prevented afterwards by another filter or database constraint. In this case the extension-data have been already updated in the user profile.
Steps to recreate
Add a collection with a relation to files, add a constraint to prevent the file deletion
Move over to files and try to delete the file
The deletion is blocked by the constraint
The profile was already updated falsely!
Possible solutions:
Get the data in the files.delete filter but only update the userprofile in the action (after deletion)
Run like this, but also store the last changes. In case the deletion does not succeed, revert them
Open a PR to Directus to add the File-Object to the delete event (best solution!)
The text was updated successfully, but these errors were encountered:
If a file should be deleted, the extension updates the data in the
files.delete
filter (before the action happens).This is necessary because after deletion the filesize is not available anymore (obviously!)
Problematically the deletion can be prevented afterwards by another filter or database constraint. In this case the extension-data have been already updated in the user profile.
Steps to recreate
Possible solutions:
files.delete
filter but only update the userprofile in the action (after deletion)The text was updated successfully, but these errors were encountered: