Add file viewer dispatch for handling multiple file types and extend download timeout
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// CreateNextcloudUser creates a new Nextcloud user account via OCS API
|
||||
@@ -71,6 +72,6 @@ func NewUserWebDAVClient(nextcloudBaseURL, username, password string) *WebDAVCli
|
||||
user: username,
|
||||
pass: password,
|
||||
basePrefix: "/",
|
||||
httpClient: &http.Client{},
|
||||
httpClient: &http.Client{Timeout: 10 * time.Minute},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"net/url"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"go.b0esche.cloud/backend/internal/config"
|
||||
)
|
||||
@@ -37,7 +38,7 @@ func NewWebDAVClient(cfg *config.Config) *WebDAVClient {
|
||||
user: cfg.NextcloudUser,
|
||||
pass: cfg.NextcloudPass,
|
||||
basePrefix: strings.TrimRight(base, "/"),
|
||||
httpClient: &http.Client{},
|
||||
httpClient: &http.Client{Timeout: 10 * time.Minute},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user