Can you send the wasm as an argument to updateManagerCanisterWasm, then handle the formatting locally? If so this thread may help you through:
updateManagerCanisterWasm