This commit is contained in:
Clément Gouin
2024-03-12 14:13:32 +01:00
parent 026082f0b3
commit ce01151224
+17 -5
View File
@@ -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() {