TODO: add upload tests