mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
fix: empty fname and fcontent of uploaded file
This commit is contained in:
@@ -15,8 +15,8 @@ def upload_bank_statement():
|
|||||||
with open(frappe.uploaded_file, "rb") as upfile:
|
with open(frappe.uploaded_file, "rb") as upfile:
|
||||||
fcontent = upfile.read()
|
fcontent = upfile.read()
|
||||||
else:
|
else:
|
||||||
from frappe.utils.file_manager import get_uploaded_content
|
fcontent = frappe.local.uploaded_file
|
||||||
fname, fcontent = get_uploaded_content()
|
fname = frappe.local.uploaded_filename
|
||||||
|
|
||||||
if frappe.safe_encode(fname).lower().endswith("csv".encode('utf-8')):
|
if frappe.safe_encode(fname).lower().endswith("csv".encode('utf-8')):
|
||||||
from frappe.utils.csvutils import read_csv_content
|
from frappe.utils.csvutils import read_csv_content
|
||||||
|
|||||||
Reference in New Issue
Block a user