mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT Deleting formatted images in Image->onBeforeDelete()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92556 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
16f69c3080
commit
46b0f0c959
@ -81,6 +81,13 @@ class Image extends File {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onBeforeDelete() {
|
||||||
|
parent::onBeforeDelete();
|
||||||
|
|
||||||
|
// Delete the temp verions of this file in assets/_resampled
|
||||||
|
$this->deleteFormattedImages();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the relative URL for this Image.
|
* Get the relative URL for this Image.
|
||||||
* Overwrites File->URL() which returns an absolute URL.
|
* Overwrites File->URL() which returns an absolute URL.
|
||||||
|
Loading…
Reference in New Issue
Block a user