Hi,
I'm trying to use superagent to upload some pdfs to Goodreader,
initial code as follow, not yet reach the file name part:
var request = require('superagent');
request
.post('http://192.168.1.127:8080/My%20Documents/
_______HTMLFORMFILEUPLOADVIAHTTP_______')
.type('multipart/form-data')
.send('foo=bar')
.end(function(res){
console.log(res)
console.log(res.text);
})
seems not so right, the html from Goodreader to upload file is as
follow, any hints on how I can make this work? thanks,
Angelo
<form name="upload" action="_______HTMLFORMFILEUPLOADVIAHTTP_______"
method="POST" enctype="multipart/form-data">
Select file to upload:
<input type="file" name="filename" size="40"
onchange="this.form.submit.style.visibility='visible'">
<input type="submit" name="submit" value="Upload selected file"
style="visibility: hidden">
</form>