finalize upload