Upload File Bug fix
This commit is contained in:
parent
932b7baf4b
commit
ff7abb0fde
|
|
@ -825,6 +825,8 @@ def StandardChangePublic(request, pk):
|
|||
standard.save()
|
||||
return redirect('standards')
|
||||
|
||||
# TODO: Upload der Standard-Dateien passt noch nicht, BUG!!!!
|
||||
|
||||
@login_required
|
||||
def StandardSingle(request, pk):
|
||||
|
||||
|
|
@ -1214,9 +1216,9 @@ def uploadFileFromStandard(request):
|
|||
file_ok = True
|
||||
|
||||
if(file_ok):
|
||||
final_file_path = settings.NEXTCLOUD_URL + "remote.php/dav/files/admin/Agenturdaten/Standards Uploadbereich/" + request.FILES['uploadedfile'].name
|
||||
final_file_path = settings.NEXTCLOUD_URL + "remote.php/dav/files/" + request.user.username + "/Agenturdaten/Standards Uploadbereich/" + request.FILES['uploadedfile'].name
|
||||
|
||||
r = requests.put(final_file_path, data=request.FILES['uploadedfile'], auth=(settings.NEXTCLOUD_USER_API, settings.NEXTCLOUD_PW_API))
|
||||
r = requests.put(final_file_path, data=request.FILES['uploadedfile'], headers={'Content-Type' : 'text/xml;', 'Authorization' : "Bearer " + request.user.profile.nc_sid})
|
||||
if(len(r.text) == 0):
|
||||
try:
|
||||
new_file_name = request.FILES['uploadedfile'].name
|
||||
|
|
|
|||
Loading…
Reference in New Issue