krolow/Attach — pull request #8 by sangregoriopaolo (2012-03-30 11:24:26+00:00)
Title: Avoid duplicating entries in database table because of storing only filename and checking for entire path

If you upload an image a second time, the row in the database is duplicated because the stored filename is

image.jpg

while when checking if the record already exists it checks for the full path

/var/www/site/webroot/upload/image/image.jpg