added key auth support for rw operations (upload, non-expiring download)

This commit is contained in:
2023-03-06 19:46:06 +01:00
parent 2a2e41126d
commit cd0939cbc8
13 changed files with 124 additions and 20 deletions

View File

@@ -64,7 +64,11 @@ func Setup(c *cfg.Config, path string) *Request {
})
}
return &Request{Url: c.Endpoint + cfg.ApiVersion + "/file/", R: R}
if len(c.Apikey) > 0 {
client.SetCommonBearerAuthToken(c.Apikey)
}
return &Request{Url: c.Endpoint + "/file/", R: R}
}