gl: add upload function