Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

蓝奏云优享版小文件上传失败 #7250

Closed
4 tasks done
houruomu opened this issue Sep 23, 2024 · 8 comments
Closed
4 tasks done

蓝奏云优享版小文件上传失败 #7250

houruomu opened this issue Sep 23, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@houruomu
Copy link

Please make sure of the following things

  • I have read the documentation.
    我已经阅读了文档

  • I'm sure there are no duplicate issues or discussions.
    我确定没有重复的issue或讨论。

  • I'm sure it's due to AList and not something else(such as Network ,Dependencies or Operational).
    我确定是AList的问题,而不是其他原因(例如网络依赖操作)。

  • I'm sure this issue is not fixed in the latest version.
    我确定这个问题在最新版本中没有被修复。

AList Version / AList 版本

v3.37.4

Driver used / 使用的存储驱动

蓝奏云优享版

Describe the bug / 问题描述

小于1.3KB的小文件以及空文件无法上传。
使用rclone挂载webdav上传会提示Failed to copy: Method Not Allowed: 405 Method Not Allowed
而使用web界面上传会提示_“-1: 未读取到文件大小”_

Reproduction / 复现链接

上传问题,无法提供链接。

Config / 配置

image

Logs / 日志

image image
@houruomu houruomu added the bug Something isn't working label Sep 23, 2024
Copy link

welcome bot commented Sep 23, 2024

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

@houruomu
Copy link
Author

houruomu commented Oct 3, 2024

问题仍然存在

@Jason-Fly
Copy link
Contributor

可以复现,上传小于1KB的文件时,会报错:
image

@Jason-Fly
Copy link
Contributor

已定位到问题,在通过/7n/getUpToken接口获取token时,如果传参中的fileSize0,则会报错。
image

@Jason-Fly
Copy link
Contributor

调研了蓝奏云优享版的/7n/getUpToken接口,发现他们在将字节数转为KB数时是向上取整的,所以改成向上取整应该可以解决。
image

image

@houruomu
Copy link
Author

Hi, 我看到您向上取整的方法是直接+1,请问这样会不会在文件大小是1024字节整数倍的情况下出现问题?

@houruomu
Copy link
Author

是否使用max(1,(x+1023)/1024)更保险?

@Jason-Fly
Copy link
Contributor

Hi, 我看到您向上取整的方法是直接+1,请问这样会不会在文件大小是1024字节整数倍的情况下出现问题?

感谢指出,您的方案会更严谨;
我尝试生成整数倍的文件进行上传,目前不会产生问题,后续可以进行优化。
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants