{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/express/issues/2747","labels_url":"https://api.github.com/repos/strongloop/express/issues/2747/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/express/issues/2747/comments","events_url":"https://api.github.com/repos/strongloop/express/issues/2747/events","html_url":"https://github.com/strongloop/express/issues/2747","id":104497996,"number":2747,"title":"multipart/mixed responses","user":{"login":"jlongie","id":13414043,"avatar_url":"https://avatars.githubusercontent.com/u/13414043?v=3","gravatar_id":"","url":"https://api.github.com/users/jlongie","html_url":"https://github.com/jlongie","followers_url":"https://api.github.com/users/jlongie/followers","following_url":"https://api.github.com/users/jlongie/following{/other_user}","gists_url":"https://api.github.com/users/jlongie/gists{/gist_id}","starred_url":"https://api.github.com/users/jlongie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlongie/subscriptions","organizations_url":"https://api.github.com/users/jlongie/orgs","repos_url":"https://api.github.com/users/jlongie/repos","events_url":"https://api.github.com/users/jlongie/events{/privacy}","received_events_url":"https://api.github.com/users/jlongie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-02T14:49:24Z","updated_at":"2015-09-02T15:07:26Z","closed_at":null,"body":"I've the following scenario: to return a multipart/mixed response that will contain the following items using NodeJS, where we control both ends of the communication so we should be able to eliminate interoperability issues.\r\n\r\nJSON file containing a list of nodes describing each ZIP i.e. [{name: test1, desc: Test1 Desc, md5: 1234ABCD, file: zip-01.zip}, {name: test1, desc: Test1 Desc, md5: 1234ABCD, file: zip-02.zip}]\r\nZIP files are read from a mongo gridfs store\r\n\r\n```sh\r\n--whoop\r\nContent-Disposition: attachment; name=\"zip\"; filename=\"tobi.zip\"\r\nContent-Type: application/zip\r\n\r\n... data here ...\r\n--whoop\r\nContent-Disposition: form-data; name=\"name\"\r\nContent-Type: text/plain\r\n\r\nTobi\r\n--whoop--\r\n```\r\n\r\nI need to stream this back to the user so that they can process the JSON file and if required, expand out the specific ZIP file they are interested in.\r\n\r\nFrom looking at the API guide http://expressjs.com/api.html I dont see how this is possible? I've got single ZIP files being returned correctly but need to support this business scenario.\r\n\r\nI'm trying to create something similar to the following: HTTP multipart response using Perl or PHP\r\n\r\nThe res should contain a JSON file and all the associated ZIP's.\r\n\r\nAny help is appreciated. Thanks.\r\n\r\nJ"},"comment":{"url":"https://api.github.com/repos/strongloop/express/issues/comments/137117394","html_url":"https://github.com/strongloop/express/issues/2747#issuecomment-137117394","issue_url":"https://api.github.com/repos/strongloop/express/issues/2747","id":137117394,"user":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T15:07:26Z","updated_at":"2015-09-02T15:07:26Z","body":"The Express API sits on top of the standard Node.js HTTP API (documentation: https://nodejs.org/api/http.html#http_class_http_serverresponse). `res` itself is a Node.js stream to you pipe to with `you_stream.pipe(res)`."}}