Add media rejected

Found a bug? Tell us!!
Post Reply
plofhead
Regular
Posts: 45
Joined: Fri Jun 23, 2006 9:01 am
Location: Netherlands
Contact:

Add media rejected

Post 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
To bee or not to bee, that is the question
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Add media rejected

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
plofhead
Regular
Posts: 45
Joined: Fri Jun 23, 2006 9:01 am
Location: Netherlands
Contact:

Post by plofhead »

Hi,

Thanks, this was the problem.

Bert
To bee or not to bee, that is the question
Post Reply