I would like the files uploaded via the "file" custom field to be stored into a dynamic directory with the username folder.
This field is only enabled for specific user role, connected users. I would like the path to be like: /myfolder/%username%/
Is it possible please?
I am using the metabox builder.
Meta Box Builder does not support getting the user name to use as the custom folder name. You need to use the PHP code to get the user name and assign it to the setting upload_dir. For example, this code gets the current user name to use as a folder name.