Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
3pia
VISPA
VISPA web
Commits
82e5f73b
Commit
82e5f73b
authored
Oct 22, 2014
by
Benjamin Fischer
Browse files
fix filesystem controller, fix #1953
parent
e0831fab
Changes
1
Hide whitespace changes
Inline
Side-by-side
vispa/controller/filesystem.py
View file @
82e5f73b
...
...
@@ -23,8 +23,7 @@ class FSController(AbstractController):
download
=
False
else
:
download
=
True
wid
=
cherrypy
.
request
.
private_params
.
get
(
'_workspaceId'
,
None
)
data
,
contenttype
,
_
=
self
.
handleDownload
(
path
,
wid
)
data
,
contenttype
,
_
=
self
.
handleDownload
(
path
)
if
contenttype
!=
None
:
cherrypy
.
response
.
headers
[
'Content-Type'
]
=
contenttype
if
download
:
# or not isbrowserfile:
...
...
@@ -32,8 +31,8 @@ class FSController(AbstractController):
cherrypy
.
response
.
headers
[
'Content-Disposition'
]
=
disposition
return
data
def
handleDownload
(
self
,
path
,
wid
):
fs
=
self
.
get
(
'fs'
,
wid
)
def
handleDownload
(
self
,
path
):
fs
=
self
.
get
(
'fs'
)
# get the content type depending on the file extension
ext
=
path
.
split
(
'.'
)[
-
1
]
mimetype
=
fs
.
get_mime_type
(
path
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment