<?php

namespace Internetgalerie\IgDatapoolFe\Controller;

use Internetgalerie\IgDatapoolFe\Utility\FormUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;

class AjaxUploadController extends ActionController
{
    public function ajaxUploadAction(): never
    {
        $formUtility = GeneralUtility::makeInstance(FormUtility::class);
        echo (json_encode($formUtility->handleAjaxUpload()));
        exit(0);
    }
}