#1542: upload refactoring continues