mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
umi-request 替换为 axios
This commit is contained in:
@@ -261,7 +261,8 @@ export default class SystemService {
|
||||
const dataFile = fs.createReadStream(config.dataTgzFile);
|
||||
res.writeHead(200, {
|
||||
'Content-Type': 'application/force-download',
|
||||
'Content-Disposition': 'attachment; filename=data.tgz'
|
||||
'Content-Disposition': 'attachment; filename=data.tgz',
|
||||
'Content-length': fs.statSync(config.dataTgzFile).size
|
||||
});
|
||||
dataFile.pipe(res);
|
||||
} catch (error: any) {
|
||||
|
||||
Reference in New Issue
Block a user