Commit 09cdeb5b by aa.gustiana@gmail.com
2 parents 171b504a 647e23e4
......@@ -97,7 +97,10 @@ def file_response(request, f=None, filename=None, filetype=None):
response = request.response
response.content_type = f"application/{filetype}"
response.content_disposition = 'filename=' + fname
# dikarenakan dibrowser selalu muncul fullpath dari file yg ditampilkan, maka diganti
# response.content_disposition = 'filename=' + fname
response.content_disposition = 'filename=' + os.path.basename(fname)
if filetype == "txt":
response.charset = "UTF-8"
response.write(f.read())
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!