From c7ce508372dcc4b7e948992396c56650b826f5c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 19 Sep 2024 15:19:46 +0200 Subject: [PATCH] download handling: adapt to method schema field rename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit check for both variants for now, and remove (old) alias with next major release Signed-off-by: Fabian Grünbichler --- src/PVE/APIServer/AnyEvent.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm index 1b2fffe..a87a696 100644 --- a/src/PVE/APIServer/AnyEvent.pm +++ b/src/PVE/APIServer/AnyEvent.pm @@ -987,7 +987,8 @@ sub handle_api2_request { $download = $res->{data}->{download} if defined($res->{data}) && ref($res->{data}) eq 'HASH'; if (defined($download)) { - if ($res->{info}->{download}) { + # TODO: remove ->{download} with PVE 9.0 + if ($res->{info}->{download_allowed} || $res->{info}->{download}) { send_file_start($self, $reqstate, $download); return; } else {