view src/test/upload.html @ 61:389e5d8e5f8a default tip

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 06 Dec 2022 13:37:25 -0700
parents acb730710328
children
line wrap: on
line source

<!doctype html>
<html>
	<head>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<style>
		</style>
		<script src="upload.js"></script>
		<script>
			function uploaded(input,url,filename) {
				console.log(url);
				let a = document.querySelector('a');
				a.textContent = filename;
				a.setAttribute('href',url);
			}
		</script>
	</head>
	<body>
		<p>top</p>
		<p>
			<input type=file xaccept="image/*" onchange="upload(this,uploaded)">
			<button onclick="fileButtonClick(this)">Upload File</button>
		</p>
		<p><a></a></p>
		<p>bottom</p>
	</body>
</html>