Commit 82e5f73b authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

fix filesystem controller, fix #1953

parent e0831fab
...@@ -23,8 +23,7 @@ class FSController(AbstractController): ...@@ -23,8 +23,7 @@ class FSController(AbstractController):
download = False download = False
else: else:
download = True download = True
wid = cherrypy.request.private_params.get('_workspaceId', None) data, contenttype, _ = self.handleDownload(path)
data, contenttype, _ = self.handleDownload(path, wid)
if contenttype != None: if contenttype != None:
cherrypy.response.headers['Content-Type'] = contenttype cherrypy.response.headers['Content-Type'] = contenttype
if download: # or not isbrowserfile: if download: # or not isbrowserfile:
...@@ -32,8 +31,8 @@ class FSController(AbstractController): ...@@ -32,8 +31,8 @@ class FSController(AbstractController):
cherrypy.response.headers['Content-Disposition'] = disposition cherrypy.response.headers['Content-Disposition'] = disposition
return data return data
def handleDownload(self, path, wid): def handleDownload(self, path):
fs = self.get('fs', wid) fs = self.get('fs')
# get the content type depending on the file extension # get the content type depending on the file extension
ext = path.split('.')[-1] ext = path.split('.')[-1]
mimetype = fs.get_mime_type(path) mimetype = fs.get_mime_type(path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment