Skip to content

How to reference Upload from another collection #827

Answered by denolfe
momin-riyadh asked this question in Q&A
Discussion options

You must be logged in to vote

You can do this by adding a relationship field with relationTo to your media collection's slug like this:

{
  name: 'image',
  type: 'upload',
  required: true,
  relationTo: 'media',
},

More info in the docs on the relationship and upload pages.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by denolfe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants