PDA

View Full Version : Image name changed.


mja394004
03-16-2010, 02:31 PM
This is a new site.
If I upload an image, the name of the image is changed when stored in the images/upload folder, but it is not changed in the mySQL file.

For example: If I upload an image named ABCDEF1234.jpg, the upload appears to work.

But the file name as stored is 4ae1dd6a368988d5995a9058d38c4df3.jpg
The file name in the products table is ABCDEF1234.jpg

There fore when html trys to render the image, it cannot be found.

Jimmy Wu
03-16-2010, 05:06 PM
The way uploading works is that the image will be uploaded to the temp directory of the server and then copied over to the specified upload directory. The reason the name of the file is incorrect is that it gets uploaded with a temporary name and then the name is modified to the correct name when its copied. So some permissions are not set correctly on either the temporary directory or the upload folder. Make sure the permissions on those are set to 777.

mja394004
03-17-2010, 11:48 AM
Thank you Jimmy.

In fact it was a permission issue.

Works fine now.

Jimmy Wu
03-17-2010, 12:11 PM
Great to hear it. If you run into any additional issues, feel free to open a new thread.