Commit 47053b92 authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

The codeeditor preview will now retrieve image files only.

parent ecb8ad0c
...@@ -57,7 +57,8 @@ class EditorController(AbstractController): ...@@ -57,7 +57,8 @@ class EditorController(AbstractController):
self.release_session() self.release_session()
rfs = self.get("fs") rfs = self.get("fs")
self.release_database() self.release_database()
filelist = rfs.get_file_list(path) filelist = rfs.get_file_list(path, reverse=True,
filter=map(lambda x: '\.'+x+'\Z', rfs.browser_extensions))
return filelist return filelist
@cherrypy.expose @cherrypy.expose
......
...@@ -43,6 +43,7 @@ class FileSystem(object): ...@@ -43,6 +43,7 @@ class FileSystem(object):
def __init__(self): def __init__(self):
# allowed extensions # allowed extensions
self.allowed_extensions = FileSystem.FILE_EXTENSIONS self.allowed_extensions = FileSystem.FILE_EXTENSIONS
self.browser_extensions = FileSystem.BROWSER_EXTENSIONS
def setup(self, basedir=None): def setup(self, basedir=None):
if basedir is None: if basedir is None:
......
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