'How to upload images to different sub-collection in cloud firebase firestore in react

I'm creating a react shopping app that contain different collections of items like hat page, sneakers page, and others a great insight on what I mean. I want an admin of the app to be able to upload to a particular page he/she wish to, base on the form that will be filled before uploading. Implementing this awesome feature has been a problem on my neck and I hope to find a befitting suggestion or preferably, a solution on how to go about this. I'll be highly thrilled if I can help be helped out. I'm using firebase storage and cloud firestore to handle files upload and database respectively. A million thanks in advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source