support callable upload_to