EventListener/UploadListener.php
public function onPostUpload(PostUploadEvent $event)
    {
        $response = $event->getResponse();

        $key = null;

        $file = $event->getFile();
        if ($file instanceof File) {
            $key = sprintf('%s://%s', 'local_tmp', $file->getFilename());

            // TODO check if mountManager has key
        }

        $response['upload_key'] = $key;
    }
public function onPostUpload(PostUploadEvent $event)
    {
        $response = $event->getResponse();

        $key = null;

        $file = $event->getFile();
        if ($file instanceof File) {
            $key = sprintf('%s://%s', 'local_tmp', $file->getFilename());

            // TODO check if mountManager has key
        }

        $response['upload_key'] = $key;
    }
Post upload event handler (returns the upload key).

@param PostUploadEvent $event