public function download() { // Grab attachment $attachment = new TicketAttachment(); $attachment->load($this->_data['id']); // Load file $file = new File(); $file->load($attachment->file_id); // Upload to browser $file->SendToBrowser(); // Prevent standard smarty output from occuring. FIXME: Is this the best way of achieving this? exit(0); }