You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bunch of sleep-deprived changes have half-un-knotted this, but also mean that ImageAddition and ImageReplace are now separate workflows -- ImageAddition gets the Transcode & Sanitize steps but ImageReplace doesn't. We should make those two steps more generic so that they can be easily used from both Addition and Replace, without needing to merge Addition and Replace into one thing.
class DataFilterEvent {
$file = "...";
}
onDataFilter($event) {
if(this->cares_about($event->file)) {
// stop this DataFilter
$event->stop();
// transcode to a new file
$tmpfile = mktemp();
transcode($event->file, $tmpfile);
unlink($event->file);
// start a new DataFilter with the new file
$subevent = send_event(new DataFilter($tmpfile));
// return the final file in the chain
$event->file = $subevent->file;
}
}
Upload -> DataUpload -> Unzip -> Transcode -> Sanitise -> ImageAddition / ImageReplace are all tied in knots together, it'd be nice if they weren't
The text was updated successfully, but these errors were encountered: