Link uploaded files to a model column if it is inside a component

System Information
  • Strapi Version: 3.6.8
  • Operating System: Win10
  • Database: sqlite
  • Node Version: 14.17.4
  • NPM Version: 6.14.14
  • Yarn Version:

Trying to upload the files and link them to the database. If the field is inside components it is not linking. Like, says I have table ‘users_data’, which have a component called ‘user_attachments’. user_attachments have a repeatable media column named ‘doc_files’, what will be the structure? I am doing this but it does not seem to work.

data.append(‘refId’, user.userDetailId);
data.append(‘ref’, ‘users_data’);
data.append(‘model’, “users_data.user_attachments”);
data.append(‘field’, ‘doc_files’);

how to achieve this?

1 Like