This project is not covered by Drupal’s security advisory policy.

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:
1. 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}.

2. 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.

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

INSTALLATION

It is done the usual way. Download the archived (tar.gz or zip) file. Unpack it and place into sites/all/modules/contrib directory. Go to "Modules" page and enable the Upload QC module.

SET UP

Go to admin/config/services/upload_qc and enter your settings.

First check box is for turning on PDO db error fix.

File name length is in characters, including white spaces and extensions.

Required word/characters will enforce a check for the pattern in every uploaded file.

Banned words/characters will block any file whose name contains the pattern.

File size is given in KB.

This module's development was supported in part by www.REIsystems.com as part of www.SBA.gov project and by http://advantexcorp.com/.

Project Information

Downloads