$def with (inputId,header,max_size,allowed_exts) $# $# This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for $# more information about the licensing of this file. $#
$:header $def sizeof_fmt(num): $ num=float(num) $for x in ['bytes','KB','MB','GB']: $if -1024 < num < 1024: $return "%3.1f%s" % (num, x) $ num /= 1024.0 $return "%3.1f%s" % (num, 'TB') $:_("Click here to download the file you submitted previously") $ allowed_exts= allowed_exts or default_allowed_file_extensions $ max_size= max_size or default_max_file_size