aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrancis <francis>2008-08-29 23:07:00 +0000
committerfrancis <francis>2008-08-29 23:07:00 +0000
commit04a0af1f181c2606b82bf6a61802529599c67474 (patch)
treed8103c903c718cf46a31aa5d1a08e2de43358039
parent7ab8eddab608b21ab2b06a031082b1abc04be935 (diff)
Show megabytes for large files.
-rw-r--r--app/views/request/_bubble.rhtml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/request/_bubble.rhtml b/app/views/request/_bubble.rhtml
index b44ea692e..25bff29b3 100644
--- a/app/views/request/_bubble.rhtml
+++ b/app/views/request/_bubble.rhtml
@@ -16,7 +16,7 @@
<strong><%= h a.display_filename %></strong>
<!-- <%= link_to h(a.display_filename), attachment_url %> -->
<br>
- <%= a.body.size / 1024 %>K
+ <%= (a.body.size > 1024 * 1024) ? ((a.body.size / 1024 / 1024).to_s + 'M') : ((a.body.size / 1024).to_s + 'K') %>
<%= link_to "Download", attachment_url %>
<!-- (<%= a.content_type %>) -->
</p>