managed to peice together file upload and invert from verious online html5 + javascript tutorials