Inline upload

PR for review. Not built.
It's a convention in go. First parameter is model and should be identical to the one in scope, but i wasn't sure, might be excessibe defensive programming.