diff options
-rwxr-xr-x | Filer.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -29,7 +29,8 @@ app.config['DROPZONE_DEFAULT_MESSAGE'] = 'Ziehe die Dateien hier hin, um sie hoc | |||
29 | 29 | ||
30 | dropzone = Dropzone(app) | 30 | dropzone = Dropzone(app) |
31 | 31 | ||
32 | basedir = 'Daten' | 32 | basedir = os.getenv('FILER_BASEDIR', './Daten') |
33 | filettl = int(os.getenv('FILER_FILETTL', 10)) | ||
33 | 34 | ||
34 | #### ADMIN FACING DIRECTORY LISTS #### | 35 | #### ADMIN FACING DIRECTORY LISTS #### |
35 | #### | 36 | #### |
@@ -151,7 +152,7 @@ def make_tree(rel, path): | |||
151 | if os.path.isdir(os.path.join(rel,fn)): | 152 | if os.path.isdir(os.path.join(rel,fn)): |
152 | tree['children'].append(make_tree(rel, fn)) | 153 | tree['children'].append(make_tree(rel, fn)) |
153 | else: | 154 | else: |
154 | ttl = 10 - int((time.time() - os.path.getmtime(os.path.join(rel,fn))) / (24*3600)) | 155 | ttl = filettl - int((time.time() - os.path.getmtime(os.path.join(rel,fn))) / (24*3600)) |
155 | tree['children'].append(dict(name=fn, download=name, ttl = ttl)) | 156 | tree['children'].append(dict(name=fn, download=name, ttl = ttl)) |
156 | return tree | 157 | return tree |
157 | 158 | ||