Enhance upload example

This commit is contained in:
Sergey Lyubka committed 2024-03-02 10:12:43 +00:00
1 parent 00db56f7d7
commit 06a9fb3f53
2 files changed
+35 -19

No files matched your search

@@ -50,7 +50,7 @@
r.onload = function() {
ev.target.value = '';
document.getElementById('el3').innerText = 'Uploading...';
fetch('/upload?name=' + encodeURIComponent(f.name), {
fetch(`/upload/${encodeURIComponent(f.name)}`, {
method: 'POST',
body: r.result,
}).then(function(res) {