feat: add timeUploaded to /tree

This commit is contained in:
jabuxas 2024-10-16 22:19:47 -03:00
parent 15c4997511
commit 71fb7b620a
2 changed files with 5 additions and 0 deletions

View File

@ -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"),
})
}

View File

@ -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}}