Reputation: 31
I can't save string buffer as file and send it, because I'm using elastic beanstalk. I just have a string and I need to user can download this as xml document.
router.get('/', (req, res) => {
let xml = `<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>`;
//What next?
});
Upvotes: 0
Views: 385
Reputation: 3336
Add content disposition header as attachment and content type as xml
Content-Disposition: attachment
Upvotes: 1