{"action":"created","issue":{"url":"https://api.github.com/repos/hapijs/discuss/issues/490","repository_url":"https://api.github.com/repos/hapijs/discuss","labels_url":"https://api.github.com/repos/hapijs/discuss/issues/490/labels{/name}","comments_url":"https://api.github.com/repos/hapijs/discuss/issues/490/comments","events_url":"https://api.github.com/repos/hapijs/discuss/issues/490/events","html_url":"https://github.com/hapijs/discuss/issues/490","id":228628609,"number":490,"title":"Forwarding a file upload to another server","user":{"login":"renehauck","id":3898144,"avatar_url":"https://avatars1.githubusercontent.com/u/3898144?v=3","gravatar_id":"","url":"https://api.github.com/users/renehauck","html_url":"https://github.com/renehauck","followers_url":"https://api.github.com/users/renehauck/followers","following_url":"https://api.github.com/users/renehauck/following{/other_user}","gists_url":"https://api.github.com/users/renehauck/gists{/gist_id}","starred_url":"https://api.github.com/users/renehauck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renehauck/subscriptions","organizations_url":"https://api.github.com/users/renehauck/orgs","repos_url":"https://api.github.com/users/renehauck/repos","events_url":"https://api.github.com/users/renehauck/events{/privacy}","received_events_url":"https://api.github.com/users/renehauck/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-05-15T07:33:56Z","updated_at":"2017-05-16T07:28:09Z","closed_at":"2017-05-16T07:28:09Z","body":"Hi,\r\n\r\ni would like to forward a file upload ( output: 'stream') to another hapijs server.\r\nSo i have this route on server \"a\" :\r\n```\r\n this.server.route({\r\n            method: \"POST\",\r\n            path: \"/api/usericon\",\r\n            config: {\r\n                auth: {\r\n                    mode: 'required',\r\n                    strategy: 'default'\r\n                },\r\n                validate: {\r\n                    payload: {\r\n                        image: Joi.object({\r\n                            pipe: Joi.func().required()\r\n                        }).unknown()\r\n                    }\r\n                },\r\n                payload: {\r\n                    timeout: 119999,\r\n                    output: 'stream',\r\n                    parse: true,\r\n                    allow: 'multipart/form-data',\r\n                    maxBytes: 4194304 //4MB\r\n                },\r\n                handler: (request, reply) => {\r\n                    const credentials = request.auth.credentials\r\n\r\n                }\r\n            }\r\n        })\r\n```\r\nThe file-stream is to be forwarded to server \"b\" which has the same configuration.\r\nIs this possible without temporary storage?\r\n\r\nMany Thanks :smiley: \r\n"},"comment":{"url":"https://api.github.com/repos/hapijs/discuss/issues/comments/301698980","html_url":"https://github.com/hapijs/discuss/issues/490#issuecomment-301698980","issue_url":"https://api.github.com/repos/hapijs/discuss/issues/490","id":301698980,"user":{"login":"renehauck","id":3898144,"avatar_url":"https://avatars1.githubusercontent.com/u/3898144?v=3","gravatar_id":"","url":"https://api.github.com/users/renehauck","html_url":"https://github.com/renehauck","followers_url":"https://api.github.com/users/renehauck/followers","following_url":"https://api.github.com/users/renehauck/following{/other_user}","gists_url":"https://api.github.com/users/renehauck/gists{/gist_id}","starred_url":"https://api.github.com/users/renehauck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renehauck/subscriptions","organizations_url":"https://api.github.com/users/renehauck/orgs","repos_url":"https://api.github.com/users/renehauck/repos","events_url":"https://api.github.com/users/renehauck/events{/privacy}","received_events_url":"https://api.github.com/users/renehauck/received_events","type":"User","site_admin":false},"created_at":"2017-05-16T07:28:09Z","updated_at":"2017-05-16T07:28:09Z","body":"The solution was this awesome plugin: [h2o2](https://github.com/hapijs/h2o2)  :+1: "}}
{"actor":{"display_login":"renehauck"}}