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):
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)
......
Supports Markdown
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