hi All,
is anyone has the simple code about upload files to restify service?
the bellow is my code but not works, can't get the files which is undefined, is there any wrong or missing.
1. on server side, I have a service using restify.
...
server = restify.createServer({
name: 'Name'
})
server.use(restify.queryParser());
server.use(restify.fullResponse());
server.use(restify.bodyParser());
server.use(restify.CORS());
server.use(restify.jsonp());
server.post( { path: config.prefix_route + '/file/upload' }, function(req, res, next){
var tempPath = req.files.file.path;
} );
<input id="file"
type="file">
<input type="submit" value="submit" />
</form>