This commit is contained in:
weiz 2024-05-09 11:59:18 +08:00
parent 6345a18b01
commit 2d5cc6c51d
2 changed files with 2 additions and 12 deletions

View File

@ -66,12 +66,7 @@
if (false === $result) {
return $this->fail(FinancialInvoiceLogic::getError());
}
header("Content-Type: application/zip");
header("Content-Transfer-Encoding: Binary");
header("Content-Length: " . filesize($result));
header("Content-Disposition: attachment; filename=\"" . basename($result) . "\"");
readfile($result);
exit;
return $this->success('下载成功', ['url' => '/' . $result], 1, 1);
}
/**

View File

@ -83,12 +83,7 @@
if (false === $result) {
return $this->fail(FinancialRefundLogic::getError());
}
header("Content-Type: application/zip");
header("Content-Transfer-Encoding: Binary");
header("Content-Length: " . filesize($result));
header("Content-Disposition: attachment; filename=\"" . basename($result) . "\"");
readfile($result);
exit;
return $this->success('下载成功', ['url' => '/' . $result], 1, 1);
}