ersize and upload at the same time