We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2096484 commit ba63f66Copy full SHA for ba63f66
example/development.html
@@ -81,10 +81,10 @@
81
const downloadLink = URL.createObjectURL(output)
82
logDom.innerHTML += ' <a href="' + downloadLink + '" download="' + file.name + '">download compressed image</a>'
83
document.getElementById('preview-after-compress').src = downloadLink
84
+ // uploadToServer(output)
85
})
86
87
- // await uploadToServer(output)
88
89
function onProgress (p) {
90
progressDom.innerHTML = '(' + p + '%' + ')'
@@ -93,7 +93,7 @@
93
94
function uploadToServer (file) {
95
var formData = new FormData()
96
- formData.append('image', file)
+ formData.append('image', file, file.name)
97
return fetch('http://localhost/image-upload-api', {
98
method: 'POST',
99
body: formData
0 commit comments