un-flush headers, caused issues
This commit is contained in:
parent
db2332b735
commit
64d681edec
2 changed files with 0 additions and 2 deletions
|
|
@ -63,7 +63,6 @@ router.get(path, async (req, res, next) => {
|
||||||
|
|
||||||
const fileName = formatSongForFs(trackAttributes) + fileExt;
|
const fileName = formatSongForFs(trackAttributes) + fileExt;
|
||||||
res.attachment(fileName);
|
res.attachment(fileName);
|
||||||
res.flushHeaders();
|
|
||||||
|
|
||||||
res.sendFile(filePath, { root: "." });
|
res.sendFile(filePath, { root: "." });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ router.get(path, async (req, res, next) => {
|
||||||
|
|
||||||
const fileName = formatAlbumForFs(albumAttributes) + ".zip";
|
const fileName = formatAlbumForFs(albumAttributes) + ".zip";
|
||||||
res.attachment(fileName);
|
res.attachment(fileName);
|
||||||
res.flushHeaders();
|
|
||||||
|
|
||||||
const zipArchiver = archiver("zip");
|
const zipArchiver = archiver("zip");
|
||||||
zipArchiver.pipe(res);
|
zipArchiver.pipe(res);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue