How to solve the error while uploading image to nodes? I have a content type and it has an image field. I'm using the File Field Paths module for the image field.

I uploaded images for some nodes via Drupal interface but then deleted them via FTP.

Then I'm trying to re-upload images to these nodes via Drupal but it gives this error and couldn't find anything to solve the problem.



How can I solve this problem via Drupal or via PHPMyAdmin etc.?
Try the Upload QC module. Some details about it (from its project page):

This module offers checks and validations for the process of uploading files. It extends the Drupal 7 core and helps avoid errors during file upload. You can now say good bye to PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 2: INSERT INTO {file_managed}.
WHO SHOULD USE
This module is for you if:

you run into errors like this one PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 2: INSERT INTO {file_managed} OR PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ... for key 'uri': INSERT INTO {file_managed}.

you would like to add additional file upload validations that check for (a) file name length, (b) file name containing certain words/characters, (c) file name not containing certain words/characters.

Drupal and/or PHP upload size limit is not working for you and you would like to set it yourself in your admin section.



Looks like item &quot;1.&quot; is pretty close to your issue, no?