1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 22:54:11 +00:00

Move file extension and type map generation from urls.py to utils.py.

This commit is contained in:
xiez
2012-07-19 22:34:11 +08:00
parent c651cca9ce
commit ab930da830
2 changed files with 1 additions and 5 deletions

View File

@@ -237,7 +237,6 @@ def valid_previewed_file(filename):
Check whether file can preview on web
"""
from urls import FILEEXT_TYPE_MAP
fileExt = os.path.splitext(filename)[1][1:]
return FILEEXT_TYPE_MAP.get(fileExt)
@@ -267,3 +266,4 @@ def gen_fileext_type_map():
d[fileext] = filetype
return d
FILEEXT_TYPE_MAP = gen_fileext_type_map()