06/01 Fix PDF statement import issue 2

This commit is contained in:
2026-06-01 13:06:30 -04:00
parent 6f72a4e711
commit e9d4a18d3c
+11 -2
View File
@@ -314,8 +314,17 @@
fd.append('file', selectedFile);
if (colMap) fd.append('col_map', JSON.stringify(colMap));
fetch('{{ url_for("bank_import.parse") }}', { method: 'POST', body: fd })
.then(r => r.json())
fetch('{{ url_for("bank_import.parse") }}', {
method: 'POST',
headers: { 'X-CSRFToken': CSRF },
body: fd,
})
.then(r => {
if (!r.ok && !r.headers.get('content-type')?.includes('application/json')) {
throw new Error(`Server error ${r.status} — check server logs for details.`);
}
return r.json();
})
.then(data => {
setParseLoading(false);
if (data.error) {