annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 <!doctype html>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 <html>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 <head>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 <meta name="viewport" content="width=device-width, initial-scale=1">
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5 <style>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 @import "/site.css";
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 </style>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 <script src="/site.js"></script>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 <script>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 function gotFile(input) {
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 let file = input.files[0];
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 //console.log(file);
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 //console.log(file instanceof File);
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 ajax("upload.js",file);
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 }
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 </script>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 </head>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
18 <body>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
19 <div content>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
20 <p>top</p>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
21 <p>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
22 <label clickable
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
23 ><input type=file xaccept="image/*" onchange="gotFile(this)"
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
24 ><span inline_button>Upload File</span>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25 </label>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
26 </p>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
27 <p><a></a></p>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
28 <p>bottom</p>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
29 </div>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
30 </body>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
31 </html>