Is there a better way to be doing this? Below is a snippet of code that I have fumbled to write so far, it works, but I would guess there has to be a better way to do it. I have a total of 12 image upload fields.
This reply has been reported for inappropriate content.
Or give all those #someId0..2 a common class to use as JS selector, that helps with most of the repetition. Need to figure out a way to get all the .get urls for different images though, maybe a data attribute.
3.) I did not tackle the .get url I think using the data-attr like Dillon recommended is probably your best bet. If that’s not an option I would create an object that holds the ID and the url to .get, but adding the data attribute would be way easier.
4.) I have not check any of the code so it might be riddle with errors, but should get you started in the right direction.
5.) if you are up for the challenge you might want to try writing this in using object literal routing for your .get urls.