File upload fix

Fixes issue #163. Also added js to new page view.