[RSS Feed/News] Returning a File to the User and Implementing AJAX Form Action

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Hey

I was wondering and struggling all day on how to make XenForo return a file to the user after a request.
I managed to get it working on direct url access. /xxxx/download
PHP:

Code:
public function actionDownload(ParameterBag $params)
    {
        $visitor = \XF::visitor();

        // Check if the user is logged in
        if (!$visitor->user_id) {
            return $this->error('You must be logged in to download scripts.');
        }

        $client = \XF::app()->http()->client()...

Read more
Read more about this Feed . . .
 
Status
Not open for further replies.
Back
Top Bottom