manifest / integrations / wpapiaddhashtoattachment
WP REST API Media File Hash
Add Hash Field to Attachments Response Object
★ 0stars
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/thinkstylestudio/wpapiaddhashtoattachment/archive/refs/heads/master.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
WP REST API - Add Hash Field to Attachments Response Object
The goal of the plugin is to add a hash value that represents each attachment. In my case I'm using the hash to look for duplicate uploads across a WordPress network. Instead of downloading every file and comparing I use the hash of the file instead.
The plugin adds mediafilemd5 to the attachments response object along with the generated hash for it's corisponding file.
Usage
1) Install
2) Activate
3) Consume via WP-API http://.com/wp/v2/media/
4) Retreive value via mediafilemd5 field.