moved upload function to its own module
Merge branch 'upload' into dev60
added comment