Extract file-upload into a directive.