Page 1 of 1

Add media rejected

Posted: Tue Oct 10, 2006 10:56 am
by plofhead
Hi,

Yesterday I tried to add a picture with Add Media. I got the following message:
File LPP_5D_MG_5819.jpg successfully uploaded as /.../.../../../../plofhead.nl/www/blog/uploads/LPP_5D_MG_5819.jpg
Thumbnail created.
Done.
INSERT INTO serendipity_images ( name, extension, mime, size, dimensions_width, dimensions_height, thumbnail_name, date, authorid, path ) VALUES ( 'LPP_5D_MG_5819', 'jpg', 'image/jpeg', 52812, 600, 400, 'serendipityThumb', 1160385006, 0, '' )
INSERT INTO serendipity_images (
name,
extension,
mime,
size,
dimensions_width,
dimensions_height,
thumbnail_name,
date,
authorid,
path
) VALUES (
'LPP_5D_MG_5819',
'jpg',
'image/jpeg',
52812,
600,
400,
'serendipityThumb',
1160385006,
0,
''
)
/ Duplicate entry '52812' for key 2
Thumbnails were created in the Upload directory, but no entry was created in MySQL database. It seems that the size of the added picture (52812) was exactly the same as a previously added picture, and therefore rejected.
After changing the picture a bit it got another filesize and I was able to add the media.
What's wrong here?

Bert

Re: Add media rejected

Posted: Tue Oct 10, 2006 12:32 pm
by garvinhicking
Hi!

Please check your serendipity_images DB table and see if you have a "unique" or "primary" key set on your "size" column? It should not be there, serendipity does not define that!

HTH,
Garvin

Posted: Wed Oct 11, 2006 9:37 am
by plofhead
Hi,

Thanks, this was the problem.

Bert