I added a 'user' field to the 'directus_files' collection (ManyToOne) in order to organize files by user through a custom hook. The files to which a user is assigned (with a specific role that I have chosen for this feature) are automatically placed in a subfolder called 'user_files' using their names (first_name + last_name).
My entire system works perfectly. When I change the user of a file, it places the file in the respective user's folder or creates one if it doesn't exist. Additionally, if I move the file to another user's folder, it updates the file's associated user.
My only issue is that when I create a new folder by selecting a user who doesn't yet have his folder, the module navigation doesn't refresh. I'm forced to manually refresh the page.
so do you know if it's possible to trigger an action to refresh the navigation from within my custom hook?