On 05/11/2012 11:15 PM, P. Douglas Reeder wrote:
On Thursday, May 10, 2012 2:47:00 AM UTC-4, John wrote:
surprisingly I didn't see any nodejs / express code examples for
downloading files (podcasts) - does anyone have links? will the
download codet trigger the "save as" dialog on the client ? thks
for any
hel
Your question is not entirely clear, but if you are serving file from
node and want a client web browser to save instead of displaying a
file, add the header
Content-disposition: attachment; filename=fname.ext
The filename MUST be ASCII to work cross browser
thank you - yes I wanted to see how to save instead of play. I'll try
adding the header info.
Also, if you're serving an HTML page with links to content that should
be downloaded instead of displayed, add the HTML5 "download" attribute
to the link. Currently, only Chrome supports this, but presume
eventually all browsers will support this, and will display the link
differently. At present, it's useful for content from servers you
don't control.
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en