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()),
|
Path: filepath.Join(r.URL.Path, file.Name()),
|
||||||
Size: info.Size(),
|
Size: info.Size(),
|
||||||
FormattedSize: FormatFileSize(info.Size()),
|
FormattedSize: FormatFileSize(info.Size()),
|
||||||
|
TimeUploaded: info.ModTime().
|
||||||
|
UTC().
|
||||||
|
Format("2006-01-02 15:04:05 UTC"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,6 +68,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
|
<th>Time Uploaded</th>
|
||||||
<th>Size</th>
|
<th>Size</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -77,6 +78,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<a href="{{.Path}}">{{.Name}}</a>
|
<a href="{{.Path}}">{{.Name}}</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td>{{.TimeUploaded}}</td>
|
||||||
<td>{{.FormattedSize}}</td>
|
<td>{{.FormattedSize}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
Loading…
Reference in New Issue
Block a user