Page MenuHomePhabricator

Make deleted images searchable by hash (disabled in Miser Mode)
Closed, ResolvedPublic

Description

I use the search by hash option to prevent my bots from uploading duplicate images. The hash of a deleted image is available in filearchive.fa_storage_key in the form <sha1>.<extension>
It would be nice if the deleted images are searchable in the api. This way I can easily skip images already deleted.


Version: unspecified
Severity: enhancement

Details

Reference
bz21346

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:58 PM
bzimport set Reference to bz21346.

Hmmm

This looks like it might be fairly simple..

The functionality is there for normal images, its only a case of duplicating/reusing it on the filearchive table..

Also needs to make sure rights are there...

[13:15:37] <RoanKattouw> The filearchive thing is different altogether, and we can get away with putting that in its own module, cf. list=deletedrevs
[13:16:17] <RoanKattouw> And then there's prop=duplicatefiles, we may want to add a param for "search old versions too" there, not sure how to handle the results though (per the old-version-matches-but-current-version-returned problem)

Readded in r89542, but it's disabled in miser mode