Cleaned up file upload implementation and made it use the new model based parent scope.