public function getStorage(UploadedFile $file) { $type = strtolower($file->getType()); return $this->container->get('filesystem_' . $type); }