dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 3bb04efcceed2366e28656d90b75e016d0279199
parent b9b281097e13a56523ed68c06b4ccc71fc593303
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Mon, 30 Jan 2023 16:10:20 -0800

add apikey/filedrop uuid to http request

Diffstat:
Mcmd/dkfupload/main.go | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmd/dkfupload/main.go b/cmd/dkfupload/main.go @@ -85,8 +85,9 @@ func main() { log.Printf("Thread #%03d | chunk #%03d | read %d | from %d to %d\n", i, chunkNum, n, offset, offset+int64(n)) if !dry { // TODO: http post the chunk to server - req, _ := http.NewRequest(http.MethodPost, dkfBaseURL+"/filedrop", nil) + req, _ := http.NewRequest(http.MethodPost, dkfBaseURL+"/file-drop/"+filedropUUID, nil) req.Header.Set("User-Agent", userAgent) + req.Header.Set("DKF_API_KEY", apiKey) _, err := client.Do(req) if err != nil { }