download handling: adapt to method schema field rename

check for both variants for now, and remove (old) alias with next major release

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2024-09-19 15:19:46 +02:00 committed by Thomas Lamprecht
parent af9d2fe4f6
commit c7ce508372

View File

@ -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 {