Upload Images how to attach to current user

Hi can you help with attaching pictures. I created a form that I use to attach picture. Photos are uploaded in Media Library → Api Upload. In strapi I created a Collection Types Gallery. I linked it to Users with the relation “Gallery has and belongs to one User”.
In form(React-Narive) I have: “formData.append(‘ref’, ‘user’); // Assuming the reference is ‘user’ for the User model
formData.append(‘refId’, userId); // User ID” with which I initialize that the photos are attached by this user. It is not very clear to me as I am new to strapi and also to React Native how to initialize the attached photos to this user and how they will be moved to The gallery.