public function getDownloadPath(\Filehosting\File $file) { $fileName = $file->getOriginalName(); $id = $file->getId(); return "/download/" . $id . "/" . $fileName; }