1、修改/www/server/panel/plugin/msonedrive/credentials.json文件

{
    "onedrive-international": {
        "client_id": "ba245204-bec1-45ed-ad17-767ba69e643d",
        "client_secret": "_J2a.-v7-vxgxY2LE66uL_oalxe9X6Ikox",
        "authority": "https://login.microsoftonline.com/common",
        "token_endpoint": "/oauth2/v2.0/token",
        "authorize_endpoint": "/oauth2/v2.0/authorize",
        "scopes": "offline_access Files.ReadWrite.All User.Read",
        "redirect_uri": "http://localhost/login/authorized",
        "api_uri": "https://graph.microsoft.com/v1.0"
    },
    "onedrive-internal": {
        "client_id": "62e624a1-3ef5-4817-9b78-4553ce0c3c4c",
        "client_secret": "-_wHwptT-dbDsON1R34uV.2TL22yvVOa5A",
        "authority": "https://login.chinacloudapi.cn/common",
        "token_endpoint": "/oauth2/v2.0/token",
        "authorize_endpoint": "/oauth2/v2.0/authorize",
        "scopes": "offline_access Files.ReadWrite.All User.Read",
        "redirect_uri": "http://localhost/login/authorized",
        "api_uri": "https://microsoftgraph.chinacloudapi.cn/v1.0"
    }
}

2、修改/www/server/panel/plugin/msonedrive/msonedrive_main.py文件解决大文件上传失败问题

def resumable_upload(self,
                         local_file_name,
                         object_name=None,
                         progress_callback=None,
                         progress_file_name=None,
                         multipart_threshold=1024 * 1024 * 2,
                         part_size=1024 * 320,
                         store_dir="/tmp",
                         auto_cancel=True,
                         retries=5,
                         ):
/www/server/panel/data/bind.pl删除这个文件即可
/www/server/panel/class找到并编辑panelplugin.py文件
使用Ctrl+F搜索并找到softList['list'] = tmpList这段代码,在其下方添加如下代码:
softList['pro'] = 1
        for soft in softList['list']:
            soft['endtime'] = 0
最后修改:2021 年 10 月 04 日
如果觉得我的文章对你有用,请随意赞赏