CORS error tryouts.
This commit is contained in:
@@ -58,10 +58,10 @@
|
||||
function uploadFile(file) {
|
||||
$("#status").html('Starting Upload...')
|
||||
url = c;
|
||||
fetch(url, {
|
||||
fetch(url, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
"content-type": "image/png"
|
||||
"content-type": "image/*"
|
||||
},
|
||||
mode: 'cors',
|
||||
body: file
|
||||
@@ -75,5 +75,6 @@
|
||||
.catch(error => $("#status").html(error)
|
||||
)
|
||||
.then(response => $("#status").html('File uploaded successfully: ' + filename + 'Response:' + response.text()));
|
||||
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user