public function showPage() { if (empty($this->attachment->filename)) { // if it's not a local file, gtfo common_redirect($this->attachment->url, 303); } parent::showPage(); }