Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-tools
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 170da2d0
authored
Feb 25, 2025
by
Tatang S
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
pdf title
1 parent
6036cd6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
opensipkd/tools/report.py
opensipkd/tools/report.py
View file @
170da2d
...
...
@@ -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
())
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment