feat: add timeUploaded to /tree
This commit is contained in:
parent
15c4997511
commit
71fb7b620a
@ -47,6 +47,9 @@ func (app *Application) fileListingHandler(w http.ResponseWriter, r *http.Reques
|
||||
Path: filepath.Join(r.URL.Path, file.Name()),
|
||||
Size: info.Size(),
|
||||
FormattedSize: FormatFileSize(info.Size()),
|
||||
TimeUploaded: info.ModTime().
|
||||
UTC().
|
||||
Format("2006-01-02 15:04:05 UTC"),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -68,6 +68,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Time Uploaded</th>
|
||||
<th>Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -77,6 +78,7 @@
|
||||
<td>
|
||||
<a href="{{.Path}}">{{.Name}}</a>
|
||||
</td>
|
||||
<td>{{.TimeUploaded}}</td>
|
||||
<td>{{.FormattedSize}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
Loading…
Reference in New Issue
Block a user