Refactored HTTP Upload