updated to handle new upload api