~cytrogen/gstack

ref: 9eb74debd50b9fdc83b7b9f2061339cb54ed2210 gstack/browse/test/fixtures/upload.html -rw-r--r-- 849 bytes
9eb74deb — Garry Tan feat: inline /office-hours — no more "another window" (v0.11.3.1) (#352) a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Test Page - Upload</title>
</head>
<body>
  <h1>Upload Test</h1>
  <input type="file" id="file-input" />
  <input type="file" id="multi-input" multiple />
  <p id="upload-result"></p>
  <script>
    document.getElementById('file-input').addEventListener('change', function(e) {
      const files = e.target.files;
      const names = Array.from(files).map(f => f.name).join(', ');
      document.getElementById('upload-result').textContent = 'Uploaded: ' + names;
    });
    document.getElementById('multi-input').addEventListener('change', function(e) {
      const files = e.target.files;
      const names = Array.from(files).map(f => f.name).join(', ');
      document.getElementById('upload-result').textContent = 'Multi: ' + names;
    });
  </script>
</body>
</html>