diff src/test/upload.html @ 33:4fdc4ec0050b

upload with uploadcare
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 01 Aug 2022 22:50:16 -0600
parents
children c8d47981c74f
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/test/upload.html	Mon Aug 01 22:50:16 2022 -0600
@@ -0,0 +1,31 @@
+<!doctype html>
+<html>
+	<head>
+		<meta name="viewport" content="width=device-width, initial-scale=1">
+		<style>
+			@import "/site.css";
+		</style>
+		<script src="/site.js"></script>
+		<script>
+			function gotFile(input) {
+				let file = input.files[0];
+				//console.log(file);
+				//console.log(file instanceof File);
+				ajax("upload.js",file);
+			}
+		</script>
+	</head>
+	<body>
+		<div content>
+			<p>top</p>
+			<p>
+				<label clickable
+					><input type=file xaccept="image/*" onchange="gotFile(this)"
+					><span inline_button>Upload File</span>
+				</label>
+			</p>
+			<p><a></a></p>
+			<p>bottom</p>
+		</div>
+	</body>
+</html>