get('BaseName'); $filetype = $this->get('FileType'); $mimetype = $this->get('MimeType'); $content = $this->get('Content'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $document = JFactory::getDocument(); $document->setMimeEncoding($mimetype); JFactory::getApplication() ->setHeader( 'Content-disposition', 'attachment; filename="' . $basename . '.' . $filetype . '"; creation-date="' . JFactory::getDate()->toRFC822() . '"', true ); echo $content; } }