protected function applyNamer(MediaInterface $media)
 {
     if ($media->getName() !== null) {
         return false;
     }
     $name = $this->namer->getName($media->getFile());
     $media->setName($name);
     return true;
 }
Exemple #2
0
 protected function getQuickUploadResponse(MediaInterface $media)
 {
     return new JsonResponse(['id' => $media->getId(), 'filename' => $media->getName(), 'filelink' => $this->getMediaLink($media)]);
 }