UX for upload many images on many folders

I am having a problem about uploading many images to many folders, and have to identify each image (by code). I have 2 ideas for this.

Option 1: Set a name for each image and the user will choose the right image and upload it (like a photo)

enter image description here

Option 2: Let the user upload all photos at once and then select the images and identify them. as photo: enter image description here I'm wondering which option will bring a better experience and save time for users. And I don't know is there any better ux-optimal alternative? Looking forward to everyone's contributions.