When uploading documents via the STUF UI, files are being stored and exposed with duplicate collection path segments in their URLs. Specifically, the collection prefix is being applied twice somewhere in the upload flow. This results in object names like products/products/admin/file.json instead of the expected products/admin/file.json, and API URLs such as /api/files/products/products/admin/file.json, where products is the collection name and admin is the role.
Acceptance Criteria:
When uploading documents via the STUF UI, files are being stored and exposed with duplicate collection path segments in their URLs. Specifically, the collection prefix is being applied twice somewhere in the upload flow. This results in object names like
products/products/admin/file.jsoninstead of the expectedproducts/admin/file.json, and API URLs such as/api/files/products/products/admin/file.json, whereproductsis the collection name andadminis the role.Acceptance Criteria:
{collection_name}/{role}/file.jsonand served at/api/files/{collection_name}/{role}/file.json.