-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
阿里云OSS下载时无法获取真实文件名 #1117
Comments
目测应该是获取下载的时候将字符“/”转换成了“%2F”,希望可以调整一下,毕竟总不能把所有文件放在根目录下。 |
试试改下file.go里面的GetDownloadURL方法,将返回的source中的%2f替换为/试试? |
这应该是一个好办法,可惜我对go并不是很熟悉,还是希望可以尽快修复 |
我代码做了一些调整 不知道能不能解决你的问题
改后的
二进制文件已上传至https://pan.c34.pw/s/lbf4 测试的时候备份原来的二进制文件和数据库 |
完美解决问题,非常感谢您提供解决办法
|
使用您的办法后,外链变成为https://haticloud.oss-cn-shanghai.aliyuncs.com/2/阿里云/eye.png?Expires=1647412680; |
@hatiwowo 试试看
|
oss-golang-sdk 的问题,暂时无法解决,参考 aliyun/aliyun-oss-go-sdk#212 |
环境
阿里云OSS:公有读私有写
Cloudreve:3.4.2
问题复现
如下,polr.zip为原上传文件,uploads_2022_Ab4xwize_polr.zip为上传后下载文件
uploads_2022_Ab4xwize为配置的存储路径uploads/{year}/{randomkey8}
通过外链获取如下:
https://z-my.oss-cn-hangzhou.aliyuncs.com/uploads%2F2022%2FAb4xwize%2Fpolr.zip?Expires=1642852526
问题对比
同配置下七牛云正常 阿里云异常
The text was updated successfully, but these errors were encountered: