3 ms·
Something like this will hopefully get the point across on how to handle "multipart/form-data" forms. It will print the content of the upload to the server's st
by Spiritus 10y ago
Something like this will hopefully get the point across on how to handle "multipart/form-data" forms. It will print the content of the upload to the server's stdout.
https://play.golang.org/p/DiNGdl27kE https://play.golang.org/p/DiNGdl27kE
You can use curl to test it out (it assumes a file called "foobar.txt" is available):
curl -v -F upload=@foobar.txt localhost:8080/upload