Uploadfehler abgefangen

This commit is contained in:
Holger Trampe 2021-09-03 15:29:28 +02:00
parent cfc428e59e
commit 39ba8d569e
1 changed files with 2 additions and 2 deletions

View File

@ -1230,8 +1230,8 @@ def uploadFileFromStandard(request):
tf.save() tf.save()
return JsonResponse({"success" : success, "data" : {'savedobj_id' : new_id, 'savedobj_name' : new_file_name}}) return JsonResponse({"success" : success, "data" : {'savedobj_id' : new_id, 'savedobj_name' : new_file_name}})
except: except:
success = False success = True
return JsonResponse({"success" : success, "data" : "ERROR"}) return JsonResponse({"success" : success, "data" : {'savedobj_id' : None, 'savedobj_name' : 'Datei hochgeladen, enthält aber falsche Zeichen. Bitte Seite neu laden und anschließend über Suchfeld hinzufügen.'}})
return JsonResponse({"success" : success, "data" : "DONE!"}) return JsonResponse({"success" : success, "data" : "DONE!"})