Fix Seafile API path from /api/v2.1/ to /api2/; v2.0.14
Publish Container / docker (push) Successful in 13m54s
Publish Container / docker (push) Successful in 13m54s
This Seafile instance exposes /api2/ not /api/v2.1/. Updated both the upload-link call in the host upload route and the dir listing in the Seafile watcher. Confirmed /api2/ works via node fetch test on the server. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
806c3bd59c
commit
26a51f9089
3 files changed
+3
-3
No files matched your search
@@ -36,7 +36,7 @@ export async function markSeafileFileSeen(filename) {
|
||||
async function listSeafileDir(dir) {
|
||||
if (!SEAFILE_URL || !SEAFILE_TOKEN || !SEAFILE_NUGGETS_REPO_ID) return []
|
||||
try {
|
||||
const url = `${SEAFILE_URL}/api/v2.1/repos/${SEAFILE_NUGGETS_REPO_ID}/dir/?p=${encodeURIComponent(dir)}`
|
||||
const url = `${SEAFILE_URL}/api2/repos/${SEAFILE_NUGGETS_REPO_ID}/dir/?p=${encodeURIComponent(dir)}`
|
||||
const res = await fetch(url, {
|
||||
headers: { Authorization: `Token ${SEAFILE_TOKEN}` },
|
||||
signal: AbortSignal.timeout(10_000),
|
||||
|
||||
@@ -103,7 +103,7 @@ function seafileConfigured() {
|
||||
}
|
||||
|
||||
async function getSeafileUploadLink(dir) {
|
||||
const url = `${SEAFILE_URL}/api/v2.1/repos/${SEAFILE_NUGGETS_REPO_ID}/upload-link/?p=${encodeURIComponent(dir)}`
|
||||
const url = `${SEAFILE_URL}/api2/repos/${SEAFILE_NUGGETS_REPO_ID}/upload-link/?p=${encodeURIComponent(dir)}`
|
||||
const res = await fetch(url, {
|
||||
headers: { Authorization: `Token ${SEAFILE_TOKEN}` },
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user