add DI support for File Upload classes

This refactoring for tests.