Can someone put up an entire example with server.inject for testing multipart file uploads? All the examples include contents that are hard coded.
It would be great to see one referencing a file in the same folder...lets call it example.pdf or example.jpg
It would be great to see one with a jpg or pdf and how they got the file contents to appear in the test case as well.
Something like https://github.com/spumko/hapi/blob/master/test/payload.js#L1166-L1167 but then take the payload form FormData and pass it to inject. Sorry but explaining how to encode http binary content is outside the scope.
link now leads to new content. Fix please.
Want to know how to make upload
https://github.com/spumko/hapi/blob/master/test/payload.js#L1166-L1167
@jt3k Took me about 15 seconds to find the relevant code. Please try to answer your own question and then post a helpful link here instead of waiting for others to answer the question for you.
https://github.com/hapijs/hapi/blob/5b8c5ff48e8ff7b9642089a84fae42d22e182c44/test/payload.js#L622-L678
@flushentitypacket Your answer is no longer relevant. Thank you for attention.