Skip to content

Commit

Permalink
add aptch to info site, add timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
dhcgn committed Jun 15, 2024
1 parent a70111a commit 1de15be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions httphandler/uploadHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ func (c Config) handleDataStorage(downloadKey string, paramMap map[string]string
}
}

// add timestamp so that root level timestamp is always the latest of any updated value
timestamp := time.Now().UTC().Format(time.RFC3339)
dataToStore["timestamp"] = timestamp

return c.StorageInstance.Store(downloadKey, dataToStore)
}

Expand Down
4 changes: 4 additions & 0 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ <h2>Getting Started</h2>
Just use this url generated just for you: <br>
<h4>Upload data</h4>
<a class="dynamic-link" data-path="/u/{{.UploadKey}}/?name=value">/u/{{.UploadKey}}/?name=value</a><br>
<h4>Upload data as Patch (to combine multiple values)</h4>
<a class="dynamic-link" data-path="/patch/{{.UploadKey}}/?name1=value">/u/{{.UploadKey}}/?name=value</a><br>
<a class="dynamic-link" data-path="/patch/{{.UploadKey}}/location_1/?name=value">/u/{{.UploadKey}}/?name=value</a><br>
<a class="dynamic-link" data-path="/patch/{{.UploadKey}}/location_2/?name=value">/u/{{.UploadKey}}/?name=value</a><br>
<h4>Download data</h4>
and access it with<br>
<a class="dynamic-link" data-path="/d/{{.DownloadKey}}/plain/name">/d/{{.DownloadKey}}/plain/name</a><br>
Expand Down

0 comments on commit 1de15be

Please sign in to comment.