Fully working version of file upload

Fixes issues #47
Merge pull request #67 from Sjeanpierre/file_upload

Fully working version of file upload