agency-os
agency-os copied to clipboard
File uploads as "Client" role, end up in the main/root folder.
I don't know if this is possible at the moment, but using the current directus_files and directus_folder roles/permissions, when a Client user uploads a new file, it ends up in the root folder, which is not visible to the Client role, so it seems as if nothing happened.
Hello @notflip, if you fixed that somehow please let me know. Thanks!
hmm, which folder would you expect it to be uploaded to? Uploads? Should we potentially not allow uploads at root to begin with?
P.S. This occurs for top level folder uploads only, uploads under a folder (e.g. Directus
) are placed in the correct location.
hmm, which folder would you expect it to be uploaded to? Uploads? Should we potentially not allow uploads at root to begin with?
I'm currently experiencing a similar issue in the app studio. I created a Website Manager role, which is scoped to view only public files and folders, similar to the Public role. I've ensured that all file fields have their root folder set inside the Public folder (as noted in this PR). However, one of our clients encountered a problem when trying to use the file library. They can upload files but cannot see them. If I grant them permission to view the files, they can use them in one of the blocks in the page builder, which then won't appear on the frontend due to permissions issues.
I considered changing the default upload folder for the entire project to something like Uploads:
However, I realized this might not be ideal as the system contains sensitive files, including invoices.
P.S. I can create a PR for the Website Manager role if this is something you'd like to include in the template.
This issue specifically was in reference to uploads within the directus app or from the portal?
I believe @notflip was referring to the portal.
When I reproduced this issue with the latest version of AgencyOS, I found that if I selected a specific folder before uploading files in the portal, it worked fine (e.g., /portal/files/folders/27fe9681-9b11-4969-91c8-765e916894f6). However, if I didn't select any folder, meaning I was on the root (e.g., /portal/files), the uploads were successful, but the user couldn't view them.
The same issue occurs in the data studio. The user can upload files to the root of the file library, but they won't be able to view them.