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

Command icon 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

didebru created an issue. See original summary.

didebru’s picture

Assigned: Unassigned » didebru

didebru’s picture

Assigned: didebru » Unassigned
Status: Active » Needs review

pfrenssen made their first commit to this issue’s fork.

pfrenssen’s picture

I 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.

pfrenssen’s picture

Title: Delete source image when corresponding file gets deleted » Allow to delete source images

  • pfrenssen committed 21e21499 on 3.x authored by didebru
    feat: #3549898 Allow to delete source images
    
    By: @didebru
    By: @...
pfrenssen’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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