Alter upload function with more params.