Hi! I am working on a multi-tenant instance of Payload, and I have a few different upload-enabled collections for different tenants/sites in my CMS.
I would like to be able to specify which upload-enabled collections my Rich Text Fields should let the users fetch images from.
I have tried the following without any success:
name: 'guideContent',
type: 'richText',
editor: lexicalEditor({
features: ({ defaultFeatures }) => [
...defaultFeatures.filter(
(feature) => !['relationship'].includes(feature.key),
),
UploadFeature({
collections: {
useronboardingMedia: {
fields: [
{
name: 'altText',
type: 'text',
},
{
name: 'slug',
type: 'text',
},
{
name: 'customer',
type: 'relationship',
relationTo: 'customer',
hasMany: false,
},
],
},
},
}),
],
}),
}```
Typing /upload still brings up all other collections that has upload enabled. This also causes an error if a user is trying to add a upload, but doesn't have access to the default/first upload-enabled collection. Payload opens a blank modal, and receives a 403 Forbidden in the console.
Is it possible to filter on upload-collections, or do I need to let all users have access to all upload-enabled collections and just tell users to remember to switch to the correct collection each time they upload/insert uploads in a rich text field?