change to pass file directly, not blob