externalize upload files script