diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinariesItem.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinariesItem.pm index 4dfb9e13f2..76a48702d5 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinariesItem.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinariesItem.pm @@ -67,9 +67,12 @@ sub GET :Allow { $c->response->header ('Content-Disposition' => 'attachment; filename="' . $resource->{filename} . '"'); $c->response->content_type('application/octet-stream'); - $c->response->body(NGCP::Panel::Utils::DeviceFirmware::get_firmware_data( - c => $c, fw_id => $item->id - )); + $c->response->body( + NGCP::Panel::Utils::DeviceFirmware::get_firmware_data( + c => $c, + fw_id => $item->id + ) + ); return; } return; diff --git a/lib/NGCP/Panel/Controller/Device.pm b/lib/NGCP/Panel/Controller/Device.pm index 36ade29f01..8edbb9c24c 100644 --- a/lib/NGCP/Panel/Controller/Device.pm +++ b/lib/NGCP/Panel/Controller/Device.pm @@ -720,9 +720,11 @@ sub devfw_download :Chained('devfw_base') :PathPart('download') :Args(0) { $c->response->header ('Content-Disposition' => 'attachment; filename="' . $fw->filename . '"'); $c->response->content_type('application/octet-stream'); - $c->response->body(NGCP::Panel::Utils::DeviceFirmware::get_firmware_data( - c => $c, fw_id => $fw->id - )); + $c->response->body( + NGCP::Panel::Utils::DeviceFirmware::get_firmware_data( + c => $c, + fw_id => $fw->id + )); } sub devconf_ajax :Chained('base') :PathPart('config/ajax') :Args(0) :Does(ACL) :ACLDetachTo('/denied_page') :AllowedRole(admin) :AllowedRole(reseller) { @@ -1885,7 +1887,11 @@ sub dev_field_firmware_download :Chained('dev_field_firmware_base') :PathPart('v $c->response->header ('Content-Disposition' => 'attachment; filename="' . $fw->filename . '"'); $c->response->content_type('application/octet-stream'); - $c->response->body($fw->data); + $c->response->body( + NGCP::Panel::Utils::DeviceFirmware::get_firmware_data( + c => $c, + fw_id => $fw->id + )); } sub dev_field_firmware_version_base :Chained('dev_field_firmware_base') :PathPart('from') :CaptureArgs(1) { @@ -1932,7 +1938,11 @@ sub dev_field_firmware_next :Chained('dev_field_firmware_version_base') :PathPar $c->response->header ('Content-Disposition' => 'attachment; filename="' . $fw->filename . '"'); $c->response->content_type('application/octet-stream'); - $c->response->body($fw->data); + $c->response->body( + NGCP::Panel::Utils::DeviceFirmware::get_firmware_data( + c => $c, + fw_id => $fw->id + )); } sub dev_field_firmware_latest :Chained('dev_field_firmware_version_base') :PathPart('latest') :Args { @@ -1960,7 +1970,11 @@ sub dev_field_firmware_latest :Chained('dev_field_firmware_version_base') :PathP $c->response->header ('Content-Disposition' => 'attachment; filename="' . $fw->filename . '"'); $c->response->content_type('application/octet-stream'); - $c->response->body($fw->data); + $c->response->body( + NGCP::Panel::Utils::DeviceFirmware::get_firmware_data( + c => $c, + fw_id => $fw->id + )); }