Add Size column to attachment (#3734)

* Add size column to attachment
Migrate attachments by calculating file sizes

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Calculate attachment size on creation

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Log error instead of returning error

Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz authored and Bo-Yi Wu committed 2018-03-31 09:10:44 +08:00
1 parent d877bf7e15
commit 3e06490d38
4 files changed
+57 -23

No files matched your search

+1 -1
View File
@@ -79,7 +79,7 @@
<li>
<a target="_blank" rel="noopener" href="{{AppSubUrl}}/attachments/{{.UUID}}">
<strong><span class="ui image octicon octicon-package" title='{{.Name}}'></span> {{.Name}}</strong>
<span class="ui text grey right">{{.MustSize | FileSize}}</span>
<span class="ui text grey right">{{.Size | FileSize}}</span>
</a>
</li>
{{end}}