annotate src/test/upload.html @ 50:0d99cec5142c

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 17 Nov 2022 22:00:59 -0700
parents acb730710328
children
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 </style>
40
1ac7aee13eca test cleanup
Franklin Schmidt <fschmidt@gmail.com>
parents: 35
diff changeset
7 <script src="upload.js"></script>
33
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 <script>
35
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
9 function uploaded(input,url,filename) {
34
c8d47981c74f upload using ajax
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
10 console.log(url);
c8d47981c74f upload using ajax
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
11 let a = document.querySelector('a');
c8d47981c74f upload using ajax
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
12 a.textContent = filename;
c8d47981c74f upload using ajax
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
13 a.setAttribute('href',url);
33
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 }
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 </script>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 </head>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 <body>
41
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
18 <p>top</p>
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
19 <p>
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
20 <input type=file xaccept="image/*" onchange="upload(this,uploaded)">
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
21 <button onclick="fileButtonClick(this)">Upload File</button>
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
22 </p>
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
23 <p><a></a></p>
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
24 <p>bottom</p>
33
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25 </body>
4fdc4ec0050b upload with uploadcare
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
26 </html>