branch | stable |
changeset 5756 | ab03e4adb4f1 |
parent 5661 | 84ef08bbda3c |
child 5762 | 730d458ec1bf |
--- a/web/formfields.py Wed Jun 16 09:30:30 2010 +0200 +++ b/web/formfields.py Wed Jun 16 09:33:04 2010 +0200 @@ -82,6 +82,8 @@ it """ +def normalize_filename(filename): + return filename.split('\\')[-1] def vocab_sort(vocab): """sort vocabulary, considering option groups""" @@ -736,7 +738,7 @@ value = None else: # set filename on the Binary instance, may be used later in hooks - value.filename = filename + value.filename = normalize_filename(filename) return value