Problem: Some sites may not have the resources to hash the remote files that they link to.

Proposed solution: Add an option to let site admins restrict hash generation to local files by only hashing files whose uri begins with "public://" or "private://".

Comments

beeyayjay created an issue. See original summary.

beeyayjay’s picture

Here's a patch that implements the proposed solution.

idebr’s picture

Status: Active » Needs review
mfb’s picture

Status: Needs review » Needs work

We should instead look at the file's stream wrapper bit flags, e.g. STREAM_WRAPPERS_LOCAL, to determine if the file is local.

mfb’s picture

StatusFileSize
new1.84 KB
mfb’s picture

Status: Needs work » Needs review

  • mfb committed 4febcc2 on 7.x-1.x
    Issue #3088056 by beeyayjay, mfb: Add option to only create hashes for...
mfb’s picture

Status: Needs review » Fixed
mfb’s picture

Status: Fixed » Needs review
StatusFileSize
new1.25 KB

Realized it would be good to skip saving the empty filehash record on file load if file hash is empty, as a performance boost - to avoid unnecessary database write.

Until now, the logic was always that we "should" have a file hash, so if it's empty when a file is loaded, try to generate one and save the filehash record back to the database.

  • mfb committed f6852e5 on 7.x-1.x
    Issue #3088056 by mfb: Followup to skip database write on file load for...
mfb’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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