imbo/imbo — pull request #253 by christeredvartsen (2014-02-19 16:27:50+00:00)
Title: Store original checksum of incoming images

Today Imbo stores `checksum` and `imageIdentifier` in the database. It should also store `originalChecksum` which is the checksum of the incoming image before any event listeners change the image.

This way clients will be able to delete images from Imbo, without knowing the ID of the image.

Pseudo code in PHP:

```php
class ImboClient {
// ...

public function delete($path) {
$sum = md5_file($path);
$query = new ImagesQuery();
$query->setChecksum($sum)->limit(1);
$images = $this->getImages($query);

if ($images) {
$this->deleteImage($images[0]['id']);
}
}
}
$client = new ImboClient();
$client->delete('/some/image.jpg');
```