Demo of multipart form/file uploading with hapi.js
.
npm install
npm run setup
npm run server
Then ...
npm run test
... or try:
curl --form [email protected] \
--form firstName=Melvin \
--form lastName=Mooney \
http://localhost:8080/submit
Other multipart/form-data
demos:
Thank you for the code above - works fine with the curl command when I test. However, when I try to use it from an HTML file the server just hangs?
/submit
is the url andtestcsvfile.csv
is the file I am trying to upload. Can I not simply use an HTML form as below?I also tried making the call using postman which received the following response
The file is a simple csv text file? Any ideas would be helpful?