On Sep 30, 2014, at 5:07 PM, Ingwie Phoenix <[email protected]> wrote:
> Cool, nice to know! :)
>
> Now, what is if I wanted to save a structure like this and send it to my
> client?
>
> {
> "files": {
> "file.jpg": <data>,
> "name": "My File"
> }
> }
JSON is UTF-8, so you're at the mercy of the base64 gods there.
How about using HTTP metadata?
res.setHeader('content-disposition', 'attachment; filename=MyFile');
Or if it's custom metadata, res.setHeader('x-my-metadata', 'value');
If you need to send multiple files, perhaps send a zip or tar of the files.
Browsers have no support for saving multiple files.
Aria
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/3A6E789F-9DF7-47AB-9E4B-789209CC32BB%40nbtsc.org.
For more options, visit https://groups.google.com/d/optout.