Skip to content

Commit

Permalink
client,webserver: Human readable timestamp for the file name.
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-warrior777 committed Feb 2, 2025
1 parent b12b9f2 commit 127b0f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/webserver/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2049,8 +2049,8 @@ func (s *WebServer) apiTakeAction(w http.ResponseWriter, r *http.Request) {
// the browser or webview as an attachment. Logfile names need to be distinct as
// webview will not overwite an existing file.
func (s *WebServer) apiExportAppLogs(w http.ResponseWriter, r *http.Request) {
timeStamp := time.Now().UnixMilli()
zipAttachment := fmt.Sprintf("attachment; filename=bwlog_%d.zip", timeStamp)
timeString := time.Now().Format("2006-01-02T15_04_05")
zipAttachment := fmt.Sprintf("attachment; filename=bwlog_%s.zip", timeString)

w.Header().Set("Content-Disposition", zipAttachment)
w.Header().Set("Content-Type", "application/octet-stream; type=zip")
Expand Down

0 comments on commit 127b0f1

Please sign in to comment.