-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Recently, our seafile server was upgraded from 6.0 to 8.0, It is found that the original upload interface cannot be used, 403 error occurred.
I checked the official API interface, It is found that the path parameter is not passed during get upload link.
So I modified the source code
GetUploadLinkRequest.cs
public string ParentDir { get; set; }
public override string CommandUri
{
get { return $"api2/repos/{LibraryId}/upload-link/?p={ParentDir}"; }
}
public GetUploadLinkRequest(string authToken, string libraryId, string parentDir = "/")
: base(authToken)
{
LibraryId = libraryId;
ParentDir = parentDir;
}
SeafSession.cs
var req = new GetUploadLinkRequest(AuthToken, libraryId, targetDirectory);
var uploadLink = await _webConnection.SendRequestAsync(ServerUri, req);
After this modification, I can upload it.
Please fix this bug. In addition, with the upgrade of seafile, some APIs will be often used, such as share links.
https://download.seafile.com/published/web-api/v2.1/share-links.md
I'm happy to contribute this part of the code, but I don't know how to pull request.
Look forward to your reply
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels