Ticket #8448: attachment-size-display.patch
| File attachment-size-display.patch, 811 bytes (added by sebastian@…, 3 years ago) |
|---|
-
trac/templates/attachment.html
old new 18 18 <form id="attachment" method="post" enctype="multipart/form-data" action=""> 19 19 <div class="field"> 20 20 <label>File<py:if test="max_size >= 0"> (size limit 21 ${pretty_size(max_size , format='%d')})</py:if>:<br />21 ${pretty_size(max_size)})</py:if>:<br /> 22 22 <input type="file" name="attachment" /></label> 23 23 </div> 24 24 <fieldset> -
trac/util/text.py
old new 213 213 if size is None: 214 214 return '' 215 215 216 jump = 512216 jump = 1024 217 217 if size < jump: 218 218 return '%d bytes' % size 219 219
