We have a requirement to store a timestamp alongside the filehash information, as we use the hash for verification that also uses a timestamp. We've written a patch to add this functionality, which is a fairly simple addition.

Comments

xtfer created an issue. See original summary.

xtfer’s picture

StatusFileSize
new5.06 KB

Patch attached

mfb’s picture

Status: Active » Needs work

This seems worth adding at least on Drupal 7, because there is just a timestamp column in the file_managed table, rather than created and changed columns.

However the patch is wrong, it removes a bunch of unrelated code.

mfb’s picture

Version: 7.x-1.x-dev » 2.x-dev
Status: Needs work » Postponed (maintainer needs more info)

In the 2.x branch, the file hash is now saved to the file_managed table itself, where we have created and changed timestamp columns. There's also an option to add an additional "original" hash column that will not be updated when the file is saved. If it's necessary for some sites, we could even provide an option to add filehash timestamp column(s) to that table?

mfb’s picture

Version: 2.x-dev » 7.x-1.x-dev
Status: Postponed (maintainer needs more info) » Needs work

Moving this back to 7.x-1.x as EOL has been extended, so it seems reasonable to add features there.

mfb’s picture

Status: Needs work » Needs review
StatusFileSize
new2.8 KB

  • mfb committed 2e7e143 on 7.x-1.x
    Issue #2816247 by xtfer, mfb: Add a timestamp for the filehash
    
mfb’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.