Skip to content

[fix] create send file function - #2

Merged
Manvan33 merged 1 commit into
Manvan33:mainfrom
Its-Just-Nans:main
Mar 30, 2022
Merged

Manvan33 merged 1 commit into
Manvan33:mainfrom
Its-Just-Nans:main

Conversation

@Its-Just-Nans

Copy link
Copy Markdown
Contributor

Create a more global send file function (using pipe !)

Also I think the clipboard can't be accessed in an unsafe context (HTTP)

P.S: also lint

Comment thread server.js
}
res.writeHead(200, { 'Content-Disposition': `attachment; filename="${filename}"` });
stream = fs.createReadStream(PATH + filename);
stream.pipe(res);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pipe !

@Manvan33
Manvan33 merged commit 6b37425 into Manvan33:main Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants