public function createFilesDocuments(Drop $drop, User $user, array $files)
    {
        $documents = [];
        $documentEntities = [];
        $currentDate = new \DateTime();
        $dropzone = $drop->getDropzone();
        $this->om->startFlushSuite();

        foreach ($files as $file) {
            $document = new Document();
            $document->setDrop($drop);
            $document->setUser($user);
            $document->setDropDate($currentDate);
            $document->setType(Document::DOCUMENT_TYPE_FILE);
            $data = $this->registerUplodadedFile($dropzone, $file);
            $document->setFile($data);
            $this->om->persist($document);
            $documentEntities[] = $document;
            $documents[] = $this->serializeDocument($document);
        }
        $this->om->endFlushSuite();

        //tracking for each document, after flush
        foreach ($documentEntities as $entity) {
            $this->eventDispatcher->dispatch('log', new LogDocumentCreateEvent($drop->getDropzone(), $drop, $entity));
        }

        return $documents;
    }