Dateiuploadfehler versuch

This commit is contained in:
holger.trampe 2020-04-19 17:01:24 +02:00
parent b9f0dced0a
commit c4b04715fd
4 changed files with 3 additions and 4 deletions

View File

@ -160,7 +160,7 @@ a.disabled {
</small></p>
</div>
<hr>
<small>Erlaubte Dateitypen: Office- und OpenOffice-Formate, PNG, JPG/JPEG, SVG, FLV, Videoformate, EPS. Maximale Uploadgröße: 2 GB</small>
<small>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</small>
</div>
{% endif %}
<!-- MODAL CHANGE DIRNAME -->

View File

@ -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]

View File

@ -27,9 +27,7 @@
{% if field.is_hidden %}
{{field}}
{% endif %}
{% endfor %}
{% endfor %}
<!-- COLLAPSE AREA FOR GROUPS FILES AND LINKED STANDARDS -->
<div class="accordion" id="additionalStandardInfos">