@noahlovell the code I have shared gets you to the record you need.
The variable “selectedFile“ is declared outside of all functions so it is a global variable and transcends all of your other function calls. If you have uploaded the image you need then the uploadFiles() function call you used will return the file objects in an array. The code I have shared extracts the first array record and puts it into the global variable selectedFile.
In your code where you say “something needs to go here” you should simply assign selecteFile.fileUrl.
Now if you have set the database property as text then that’s what you’ll get in the data collection. If you have set the property to image then you should see the image.
What is your database schema?
Make sure you use the correct record _id when you use update.
Perhaps if you share a url to your page it will make diagnosing the solution easier. Just comment out where you want the picture for now.