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
You need to sign in or sign up before continuing.
Commit 09cdeb5b
authored
Aug 12, 2025
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
https://git.opensipkd.com/aa.gusti/opensipkd-tools
2 parents
171b504a
647e23e4
Show 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 @
09cdeb5
...
...
@@ -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