Update module to use generic upload function and callbacks