The image uploader appears to be horribly broken on an old Magento site we maintain … I’m getting the “Upload HTTP Error” error, and can’t seem to figure out how to fix it.
Regardless, we’re in the process of upgrading the site, so I’ve decided to give up on fixing it as the update should do so.
But the customer wants images added to two products on the old site now (as in today) and without fixing the image uploader I’m not sure how to do this.
I thought I could do it by inserting data manually into the database, but it’s so horribly complex I’m not really sure where to begin – catalog_product_entity_media_gallery looks like a good place to start, but the value for the image path it’s storing seems to refer to the cache.
I’ve also looked around for ways to add images to products programmatically (without much luck) would that be a good way to go? If so how?
Basically, how can I manually add an image to said Magento proudct in Magento 1.4.0.1?
In the end I managed to add an image manually by inserting data into the
catalog_product_entity_varchartable, the attribute ID’s I used where 74, 75 and 76 (one for thumbnail, large image, etc.) so you end up with something like:insert the following
In the end I changed the directory for image uploads using upload_tmp_dir in php.ini to a directory in the site root, it was set as default but for some reason it wasn’t able to use C:/Windows/Temp (I’m certain it had the right permissions)
Anyway, hopefully this might help someone!