alist-org / alist

🗂️A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs. / 一个支持多存储的文件列表/WebDAV程序,使用 Gin 和 Solidjs。
https://alist.nn.ci
GNU Affero General Public License v3.0
42.44k stars 5.49k forks source link

尝试使用api上传文件时遭遇可复现异常 #6595

Closed imfusheng closed 1 month ago

imfusheng commented 3 months ago

Please make sure of the following things

AList Version / AList 版本

v3.34.0

Driver used / 使用的存储驱动

OneDrive

Describe the bug / 问题描述

尝试使用Upload APi上传文件时遭遇未知异常,而手动上传不会触发

Reproduction / 复现链接

        with open(file_path, 'rb') as f:
            file_content = f.read()
        today = datetime.date.today()
        today = str(today)
        headers = {
            "Authorization": token,
            "File-Path": quote('rec/录播/' + vtb_name +'/'+ today +'/'+ upload_file_name),
            "As-Task": "false",
            "Content-Type": "application/octet-stream",  
            "Content-Length": str(len(file_content)),  
        }
        response = requests.put(url, headers=headers, data=file_content)

如上部分是我使用的上传逻辑,我尝试进行了四次故障转移,但报错均为 {'code': 500, 'message': "onedrive: Failed to upload new file(path=/录播/主播名/2024-06-08/故障转移2024-06-08 16:47:41): Resource not found for the segment 'root:'.", 'data': None} {'code': 500, 'message': "Resource not found for the segment 'root:'.", 'data': None}

Config / 配置

image

Logs / 日志

我试图查找了alist中对此错误的记录,但似乎并无任何日志

welcome[bot] commented 3 months ago

Thanks for opening your first issue here! Be sure to follow the issue template!

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 month ago

Hello @, this issue was closed due to inactive more than 52 days. You can reopen or recreate it if you think it should continue. Thank you for your contributions again.