Refactoring upload datatype