moved javascript for upload to m2-node.js