isPut example


        return [
            'Enlight_Controller_Front_PreDispatch' => 'validateContentLength',
        ];
    }

    /** * @throws UploadMaxSizeException */
    public function validateContentLength(Enlight_Controller_EventArgs $args)
    {
        $checkRequest = $args->getRequest()->isPost() || $args->getRequest()->isPut();
        $exceptionAlreadyThrown = $this->hasUploadMaxSizeExceptions($args->getResponse());

        if (!$checkRequest || $exceptionAlreadyThrown) {
            return;
        }

        if (!$this->hasPostMaxSizeBeenExceeded($args->getRequest())) {
            return;
        }

        throw new UploadMaxSizeException();
    }
Home | Imprint | This part of the site doesn't use cookies.