From c4b04715fdd3f28517a7b073c88a4e9095ce20ca Mon Sep 17 00:00:00 2001
From: "holger.trampe"
Date: Sun, 19 Apr 2020 17:01:24 +0200
Subject: [PATCH] Dateiuploadfehler versuch
---
cloud/templates/cloud/cloud_main.html | 2 +-
cloud/views.py | 1 +
.../__pycache__/settings.cpython-38.pyc | Bin 3891 -> 3891 bytes
.../templates/standards/standards_add.html | 4 +---
4 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/cloud/templates/cloud/cloud_main.html b/cloud/templates/cloud/cloud_main.html
index 7eeb711..a192630 100644
--- a/cloud/templates/cloud/cloud_main.html
+++ b/cloud/templates/cloud/cloud_main.html
@@ -160,7 +160,7 @@ a.disabled {
-Erlaubte Dateitypen: Office- und OpenOffice-Formate, PNG, JPG/JPEG, SVG, FLV, Videoformate, EPS. Maximale Uploadgröße: 2 GB
+Erlaubte Dateitypen: doc/docx, xls/xlsx, odt, ods, ppt/pptx, mov, avi, svg, png, jpg/jpeg, mp3, mp4, wav, zip, rar, mwv, flv, eps, txt, pdf. Maximale Uploadgröße: 2 GB
{% endif %}
diff --git a/cloud/views.py b/cloud/views.py
index e001646..12fd8c8 100644
--- a/cloud/views.py
+++ b/cloud/views.py
@@ -265,6 +265,7 @@ def adddirbyajax(request, parent):
datadir_parentid = tempdir
if(replace == "0"):
+ request.FILES["uploadedfile"].name = request.FILES["uploadedfile"].name.encode().decode(encoding='UTF-8',errors='strict')
tempdatafile = DataFile(file=request.FILES['uploadedfile'], name=str(request.FILES['uploadedfile'].name).encode().decode(encoding='UTF-8',errors='strict'), owner=request.user, parent=datadir_parentid, agency=request.user.profile.agency)
else:
tempdatafile = list(DataFile.objects.filter(name__icontains=request.FILES['uploadedfile'].name, agency=request.user.profile.agency))[0]
diff --git a/digitaleagentur/__pycache__/settings.cpython-38.pyc b/digitaleagentur/__pycache__/settings.cpython-38.pyc
index 40016397c99132b651c80f008030fefc11e5f903..0f8659dba989d310cc65f5de1894b575f2fe2acc 100644
GIT binary patch
delta 19
Zcmdliw^@!Wl$V!_0SFePZ{*VC2LLTF1Rwwa
delta 19
Zcmdliw^@!Wl$V!_0SF>oHgak50{|+~1GNAE
diff --git a/standards/templates/standards/standards_add.html b/standards/templates/standards/standards_add.html
index 34733f1..0a40974 100644
--- a/standards/templates/standards/standards_add.html
+++ b/standards/templates/standards/standards_add.html
@@ -27,9 +27,7 @@
{% if field.is_hidden %}
{{field}}
{% endif %}
- {% endfor %}
-
-
+ {% endfor %}