Passed integration test and fixed bugs on upload handler