I am having trouble getting node-gm streams to be accepted by form-data, for example the following code:
gm('somefilepath.png')
.resize(100, 100)
.noProfile()
.stream(function(err, stdout, stderr) {
form = new FormData()
form.append('file', stdout)
form.submit('http://foo')
})
fails with an error
events.js:71
throw arguments[1]; // Unhandled 'error' event
^
Error: Parse Error
at Socket.socketOnData (http.js:1367:20)
at TCP.onread (net.js:403:27)
Note that file streams work no problem with form-data, but i just can't get the GM stream. Thoughts?
I am having trouble getting node-gm streams to be accepted by form-data, for example the following code:
fails with an error
Note that file streams work no problem with form-data, but i just can't get the GM stream. Thoughts?