protected function dispatchPreUploadEvent(FileInterface $uploaded, ResponseInterface $response, Request $request)
    {
        $dispatcher = $this->container->get('event_dispatcher');

        // dispatch pre upload event (both the specific and the general)
        $preUploadEvent = new PreUploadEvent($uploaded, $response, $request, $this->type, $this->config);
        $dispatcher->dispatch(UploadEvents::PRE_UPLOAD, $preUploadEvent);
        $dispatcher->dispatch(sprintf('%s.%s', UploadEvents::PRE_UPLOAD, $this->type), $preUploadEvent);
    }
protected function dispatchPreUploadEvent(FileInterface $uploaded, ResponseInterface $response, Request $request)
    {
        $dispatcher = $this->container->get('event_dispatcher');

        // dispatch pre upload event (both the specific and the general)
        $preUploadEvent = new PreUploadEvent($uploaded, $response, $request, $this->type, $this->config);
        $dispatcher->dispatch(UploadEvents::PRE_UPLOAD, $preUploadEvent);
        $dispatcher->dispatch(sprintf('%s.%s', UploadEvents::PRE_UPLOAD, $this->type), $preUploadEvent);
    }
protected function dispatchPreUploadEvent ( FileInterface $ uploaded , ResponseInterface $ response , Request $ request ) { $ dispatcher = $ this -> container -> get ( 'event_dispatcher' ) ; // dispatch pre upload event (both the specific and the general) $ preUploadEvent = new PreUploadEvent ( $ uploaded , $ response , $ request , $ this -> type , $ this -> config ) ; $ dispatcher -> dispatch ( UploadEvents :: PRE_UPLOAD , $ preUploadEvent ) ; $ dispatcher -> dispatch ( sprintf ( '%s.%s' , UploadEvents :: PRE_UPLOAD , $ this -> type ) , $ preUploadEvent ) ; }
This function is a helper function which dispatches pre upload event.

@param FileInterface $uploaded the uploaded file
@param ResponseInterface $response a response object
@param Request $request the request object
This function is a helper function which dispatches pre upload event .