umi-request 替换为 axios

This commit is contained in:
whyour committed 2023-07-17 23:13:06 +08:00
1 parent bd166ee794
commit efd4f1d5ab
32 files changed
+215 -214

No files matched your search

+2 -1
View File
@@ -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) {