CORS error still!

This commit is contained in:
Naida Vatric
2020-02-16 12:11:18 +01:00
parent 57df42dd05
commit 57329b0311
2 changed files with 7 additions and 26 deletions

View File

@@ -9,8 +9,8 @@
<div class="mdl-textfield mdl-js-textfield mdl-textfield--file" id="status"></div>
<script type="text/javascript">
var c = "";
//Example - preuzeto
var c = "";
var filename = "";
function uuidv4() {
@@ -58,7 +58,6 @@ var c = "";
function uploadFile(file) {
$("#status").html('Starting Upload...')
url = c;
console.log("RADIL" + file);
fetch(url, {
method: 'PUT',
headers: {
@@ -75,6 +74,6 @@ var c = "";
)
.catch(error => $("#status").html(error)
)
.then(response => $("#status").html('File uploaded successfully: ' + filename + response.text()));
.then(response => $("#status").html('File uploaded successfully: ' + filename + 'Response:' + response.text()));
}
</script>