Update main.py
Browse files
main.py
CHANGED
|
@@ -279,7 +279,7 @@ def upload_statements():
|
|
| 279 |
if not files:
|
| 280 |
return jsonify({"error": "No files uploaded"}), 400
|
| 281 |
|
| 282 |
-
|
| 283 |
for f in files:
|
| 284 |
filename = f.filename or "statement.pdf"
|
| 285 |
# upload raw PDF to storage
|
|
@@ -290,6 +290,7 @@ def upload_statements():
|
|
| 290 |
# rewind for processing
|
| 291 |
f.seek(0)
|
| 292 |
|
|
|
|
| 293 |
# extract + store transactions
|
| 294 |
txns = process_pdf_pages(f)
|
| 295 |
for txn in txns:
|
|
|
|
| 279 |
if not files:
|
| 280 |
return jsonify({"error": "No files uploaded"}), 400
|
| 281 |
|
| 282 |
+
store_count = 0
|
| 283 |
for f in files:
|
| 284 |
filename = f.filename or "statement.pdf"
|
| 285 |
# upload raw PDF to storage
|
|
|
|
| 290 |
# rewind for processing
|
| 291 |
f.seek(0)
|
| 292 |
|
| 293 |
+
|
| 294 |
# extract + store transactions
|
| 295 |
txns = process_pdf_pages(f)
|
| 296 |
for txn in txns:
|