diff --git a/api/views.py b/api/views.py
index b4dde97..13c985a 100644
--- a/api/views.py
+++ b/api/views.py
@@ -444,12 +444,13 @@ def NCSwitchStandardFiles(request):
response_status = "OK"
for f in standard.addedfiles.all():
- file_name_normal = str(f.name).encode('UTF-8')
- file_name_normal_utf8 = file_name_normal.decode('UTF-8')
-
+
#filesearchdata = '/files/' + settings.NEXTCLOUD_USER_API + '/Agenturdaten_' + str(standard.agency.pk) + 'infinity' + file_name_normal_utf8 + ''
- filesearchdata = '/files/' + settings.NEXTCLOUD_USER_API + '/Agenturdateninfinity' + file_name_normal_utf8 + ''
+ filesearchdata = '/files/' + settings.NEXTCLOUD_USER_API + '/Agenturdateninfinity' + f.name + ''
+
+ filesearchdata_temp = filesearchdata.encode('UTF-8')
+ filesearchdata = filesearchdata_temp.decode('UTF-8')
r = requests.request("SEARCH", settings.NEXTCLOUD_URL + "remote.php/dav", data=filesearchdata, auth=(settings.NEXTCLOUD_USER_API, settings.NEXTCLOUD_PW_API), headers={'Content-Type' : 'text/xml'})
fileid = getFileIdFromXML(r.text)