I am looking for a way to upload/import images into my database, this I can do, however what I am looking to do is upload/import images that have a filename that matches the inventory # it will automatically import into that row, for example images name 1001-1.jpg, 1001-2.jpg would import into the inventory # 1001 row and images with the name of 4022-1.jpg, 4022-2.jpg would import into the inventory # 4022 row.
hopefully someone can point me in the right direction on how to keep this.
// upload image
// strip out image filename after the first "-" to leave only the first section
// check if you have an inventory item with the same code
// if you do, add image to it