From dec2383a040ce25de01a7e5d1c1143e0dc656348 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 9 Oct 2023 01:26:15 +0300 Subject: [PATCH] update torrent file name #11 --- src/Controller/TorrentController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Controller/TorrentController.php b/src/Controller/TorrentController.php index 38f7af8..9ca9296 100644 --- a/src/Controller/TorrentController.php +++ b/src/Controller/TorrentController.php @@ -997,9 +997,10 @@ class TorrentController extends AbstractController $response->headers->set( 'Content-Disposition', sprintf( - 'attachment; filename="%s.%s.%s.torrent";', - $this->getParameter('app.name'), - $torrent->getId(), + 'attachment; filename="%s.%s.torrent";', + mb_strtolower( + $this->getParameter('app.name') + ), mb_strtolower( $file->getName() )