fix cors
This commit is contained in:
@@ -224,11 +224,23 @@ let app = {
|
|||||||
this.available = [];
|
this.available = [];
|
||||||
this.error = "";
|
this.error = "";
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
Papa.parse(newValue, {
|
fetch(newValue, {
|
||||||
download: true,
|
headers: {
|
||||||
complete: this.dataComplete,
|
Origin: window.location.host,
|
||||||
error: this.dataError,
|
},
|
||||||
});
|
})
|
||||||
|
.then((response) => {
|
||||||
|
response
|
||||||
|
.text()
|
||||||
|
.then((content) => {
|
||||||
|
Papa.parse(content, {
|
||||||
|
complete: this.dataComplete,
|
||||||
|
error: this.dataError,
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(this.dataError);
|
||||||
|
})
|
||||||
|
.catch(this.dataError);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
multiple() {
|
multiple() {
|
||||||
|
|||||||
Reference in New Issue
Block a user