Commit 170da2d0 by Tatang S

pdf title

1 parent 6036cd6d
......@@ -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!