diff --git a/filemanager/views.py b/filemanager/views.py index cf91e7d42..d33899d04 100755 --- a/filemanager/views.py +++ b/filemanager/views.py @@ -64,8 +64,9 @@ def downloadFile(request): try: userID = request.session['userID'] admin = Administrator.objects.get(pk=userID) + import urllib.parse - fileToDownload = request.GET.get('fileToDownload') + fileToDownload = urllib.parse.unquote(request.GET.get('fileToDownload')) domainName = request.GET.get('domainName') currentACL = ACLManager.loadedACL(userID) diff --git a/plogical/test.py b/plogical/test.py index e69de29bb..8278a4ee9 100755 --- a/plogical/test.py +++ b/plogical/test.py @@ -0,0 +1,3 @@ +import urllib.parse +encodedStr = 'ville.laprairie.qc.ca&fileToDownload=/home/ville.laprairie.qc.ca/public_html/app/uploads/2019/05/2019-05-16_Terre-contamine%CC%81e-sur-Goyer-150x150.jpg' +print(urllib.parse.unquote(encodedStr)) \ No newline at end of file