Skip to content

feat(drivers): add Rakuten Drive support#2084

Open
rufusu wants to merge 1 commit intoOpenListTeam:mainfrom
rufusu:feat/rakutenDrive
Open

feat(drivers): add Rakuten Drive support#2084
rufusu wants to merge 1 commit intoOpenListTeam:mainfrom
rufusu:feat/rakutenDrive

Conversation

@rufusu
Copy link

@rufusu rufusu commented Feb 6, 2026

feat(rakuten_drive): add Rakuten Drive storage driver

Description / 描述

  • Added a new RakutenDrive driver with list, link, mkdir, move, rename, copy, delete, upload (S3 multipart), and storage quota support.
  • Implemented token refresh + JWT exp parsing, request wrapper, and path normalization utilities.
  • Registered the driver in drivers/all.go.

Motivation and Context / 背景

  • Enables OpenList to connect to 楽天ドライブ via its API for file operations and uploads.

How Has This Been Tested? / 测试

  • Built and ran the Docker container locally to verify the Rakuten Drive works.

Checklist / 检查清单

  • I have read the CONTRIBUTING document.
    我已阅读 CONTRIBUTING 文档。
  • I have formatted my code with go fmt or prettier.
    我已使用 go fmtprettier 格式化提交的代码。
  • I have added appropriate labels to this PR (or mentioned needed labels in the description if lacking permissions).
    我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
  • I have requested review from relevant code authors using the "Request review" feature when applicable.
    我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。
  • I have updated the repository accordingly (If it’s needed).
    我已相应更新了相关仓库(若适用)。
  • OpenList-Frontend #XXXX
  • OpenList-Docs #XXXX

@rufusu rufusu marked this pull request as draft February 6, 2026 04:52
@rufusu rufusu marked this pull request as ready for review February 6, 2026 04:53
@rufusu rufusu marked this pull request as draft February 6, 2026 04:53
@rufusu rufusu marked this pull request as ready for review February 6, 2026 05:08
if srcRemote == "" {
srcRemote = d.toRemotePath(srcObj.GetPath(), srcObj.IsDir())
}
prefix := path.Dir(srcRemote)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can extract it as a function? It was used four times.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion. Will update this to reduce duplication as well.

}
if strings.HasSuffix(itemPath, "/") {
isFolder = true
}
Copy link
Member

@dezhishen dezhishen Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind moving this part into its own method? It would make the code easier to read and maintain.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion — I’ll update this to reduce duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants