Skip to content

Commit

Permalink
Set filename for download
Browse files Browse the repository at this point in the history
  • Loading branch information
khromov committed Dec 3, 2024
1 parent 909ab66 commit 8790c32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/[preset]/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export const GET: RequestHandler = async ({ params }) => {
return new Response(response, {
status: 200,
headers: {
'Content-Type': 'text/plain; charset=utf-8'
'Content-Type': 'text/plain; charset=utf-8',
'Content-Disposition': `attachment; filename="${presetNames.join('-')}.txt"`
}
})
} catch (e) {
Expand Down

0 comments on commit 8790c32

Please sign in to comment.