mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 08:16:11 +01:00
bug file download
This commit is contained in:
@@ -84,8 +84,8 @@ def downloadFile(request):
|
||||
userID = request.session['userID']
|
||||
admin = Administrator.objects.get(pk=userID)
|
||||
|
||||
fileToDownload = '/home/cyberpanel.xyz/public_html/hello.txt'
|
||||
domainName = 'cyberpanel.xyz'
|
||||
fileToDownload = request.GET.get('fileToDownload')
|
||||
domainName = request.GET.get('domainName')
|
||||
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
|
||||
@@ -94,8 +94,6 @@ def downloadFile(request):
|
||||
else:
|
||||
return ACLManager.loadErrorJson('permissionsChanged', 0)
|
||||
|
||||
logging.CyberCPLogFileWriter.writeToFile('test')
|
||||
|
||||
response = HttpResponse(content_type='application/force-download')
|
||||
response['Content-Disposition'] = 'attachment; filename=%s' % (fileToDownload.split('/')[-1])
|
||||
response['X-LiteSpeed-Location'] = '%s' % (fileToDownload)
|
||||
|
||||
Reference in New Issue
Block a user