This may be a unique situation, but I have an issue where sometimes temporary files are no longer on the filesystem, so when I upload the csv it finds a filename that it can save it as, but when inserting an entry into the file_managed table, it causes a PDO duplicate entry error. That is because there is an entry in the db table for a file that doesn't exist anymore. With this module, there isn't really a reason to save every csv upload separately, so why not just let it overwrite any existing files? This fixes the error. Patch to come.

CommentFileSizeAuthor
#2 tablefield-file_replace-2804201-1.patch738 bytesbdlangton
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bdlangton created an issue. See original summary.

bdlangton’s picture

Status: Active » Needs review
FileSize
738 bytes
lolandese’s picture

Status: Needs review » Postponed (maintainer needs more info)

I am not able to reproduce the issue. I tried deleting a file from the table file_managed and upload it again. That works without problems.

I do not see much harm in adding some parameters to the function file_save_upload. Nonetheless can you provide the steps necessary to reproduce the issue?

lolandese’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev