feat: add support for uploading Hotspot Captive Portal files (like background image, logo) (#42)

* feat: add support for uploading Hotspot Captive Portal files (like background image, logo)

* feat: add UploadPortalFileFromReader
This commit is contained in:
Mateusz Filipowicz
2025-03-03 02:03:10 +01:00
committed by GitHub
parent bdc73a9811
commit 278a72fbb9
6 changed files with 330 additions and 16 deletions

View File

@@ -20,6 +20,9 @@ const (
statusPath = "/status"
statusPathNew = "/proxy/network/status"
uploadPath = "/upload"
uploadPathNew = "/proxy/network/upload"
logoutPath = "/api/logout"
defaultUserAgent = "go-unifi/0.0.1"
@@ -38,6 +41,7 @@ type APIPaths struct {
LoginPath string
StatusPath string
LogoutPath string
UploadPath string
}
var (
@@ -47,6 +51,7 @@ var (
LoginPath: loginPath,
StatusPath: statusPath,
LogoutPath: logoutPath,
UploadPath: uploadPath,
}
NewStyleAPI = APIPaths{
ApiPath: apiPathNew,
@@ -54,6 +59,7 @@ var (
LoginPath: loginPathNew,
StatusPath: statusPathNew,
LogoutPath: logoutPath,
UploadPath: uploadPathNew,
}
)