for chunk in csv_file.chunks():
destination.write(chunk)
'''
-def aktualisiere_config(config, data):
- if data["briefpapier"]:
- uploaded_file = data["briefpapier"]
+def aktualisiere_config(config, data, file):
+
+ if file:
+ uploaded_file = file.name
data_path = config.requireConfig("data_path")
# copy briefpapier into data_path
- with open(os.path.join(data_path, uploaded_file.name), 'wb+') as destination:
- for chunk in uploaded_file.chunks():
+ with open(os.path.join(data_path, uploaded_file), 'wb+') as destination:
+ for chunk in file.chunks():
destination.write(chunk)
- config.setConfig("briefpapier", uploaded_file.name)
-
+ config.setConfig("briefpapier", uploaded_file)
+
if data["basisbeitrag"]:
config.setConfig("beitrag_basis", data["basisbeitrag"])
-
+
if data["zusatzbeitrag"]:
config.setConfig("beitrag_zusatz", data["zusatzbeitrag"])