Problem/Motivation
Our customer wants to be able to remove files from drupal and rokka.
Steps to reproduce
Try to delete a file in drupal the rokka file still exists.
Proposed resolution
Implement
Deleting source images with binary hash
The same binary hash can have different entries in rokka, if they have different dynamic metadata. With this command you can delete all of them at once
curl -X DELETE 'https://api.rokka.io/sourceimages/mycompany?binaryHash=03b3e8a0bdd76ef55...'
$client = \Rokka\Client\Factory::getImageClient('mycompany', 'apiKey');
$isDeleted = $client->deleteSourceImagesWithBinaryHash('03b3e8a0bdd76ef55c021066642c9d2fa9c02799');
var_dump($isDeleted);
And a delete hook.
Issue fork rokka-3549898
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
didebruComment #4
didebruComment #6
pfrenssenI see the MR has been simplified to just having an additional method to allow to delete images manually on Rokka. The delete hook is no longer there. That makes this quite safe to commit, we don't have to worry about users that might want to keep the images on Rokka after they are deleted on the Drupal side.
Comment #7
pfrenssenComment #9
pfrenssen