Enabled the module and expected that hashes would be generated for existing files. I have reviewed the code and cannot find any code for this. I will look into this and hopefully come up with a patch later on.

CommentFileSizeAuthor
#3 2491551-bulk.patch3.43 KBmfb
#2 2491551-bulk.patch4.04 KBminoroffense

Comments

mfb’s picture

file hashes are generated on demand when a file object is loaded. This made a lot more sense for my use case - a site with tens of thousands of files.

minoroffense’s picture

Status: Active » Needs review
StatusFileSize
new4.04 KB

This adds an option in the settings page to trigger hash update. All we need to do is call file_load() on all files. Filehash will take care of the rest.

mfb’s picture

StatusFileSize
new3.43 KB

Great. I refactored it a bit so that it's similar to batch code in another module of mine (should make it easier to get the Drupal 8 version working)

  • mfb committed 6e87655 on 7.x-1.x
    Issue #2491551 by minorOffense, mfb: Bulk generation of file hashes
    
mfb’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

mfb’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Status: Closed (fixed) » Patch (to be ported)

This needs to be ported to drupal 8 branch.

  • mfb committed 8a1a101 on 8.x-1.x
    Issue #2491551 by mfb: Bulk generation of file hashes
    
mfb’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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