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.52k stars 5.5k forks source link

对象存储无法上传文件夹,会变成文件 #6410

Closed beijifengren closed 2 months ago

beijifengren commented 5 months ago

Please make sure of the following things

AList Version / AList 版本

v3.33.0

Driver used / 使用的存储驱动

本机存储 转 S3 对象存储

Describe the bug / 问题描述

添加存储时使用本机存储挂载了一个本地的目录,之后启用对象存储,将本地的这个目录转为S3对象存储,在Windows下使用S3 browser 进行上传文件夹,上传的文件夹会变成文件,导致该文件夹里面的文件均无法上传,但是单独上传文件则是可以的。同时在S3 browser中New Folder 也会变成file,这个应该是bug吧,因为我切换到minio创建的存储桶,则不存在该问题。

Reproduction / 复现链接

Config / 配置

Logs / 日志

No response

welcome[bot] commented 5 months ago

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

miyunwangluo commented 5 months ago

我采用minio-go测试了下 上传文件 比如1.png没问题 可以正常上传 但带路径比如uploads/1.png就不行了 提示Failed to upload file: The specified key does not exist. 应该是alist的对象存储还没实现对路径的支持吧

beijifengren commented 5 months ago

我采用minio-go测试了下 上传文件 比如1.png没问题 可以正常上传 但带路径比如uploads/1.png就不行了 提示Failed to upload file: The specified key does not exist. 应该是alist的对象存储还没实现对路径的支持吧

这时候你去看存储桶中的数据,应该会发现出现了一个uploads的文件本来应该是uploads的文件夹,他把创建文件夹的操作和创建文件的操作混淆了吧

itsHenry35 commented 4 months ago

我也发现这个问题了,回头修

gowy222 commented 4 months ago

S3接口将来会产生bug

S3 是一个对象存储服务,它使用键值对的方式存储对象(文件) 在 S3 中,文件夹实际上是一个命名空间的概念,用于组织和管理对象

S3这块,建议重新评估,要不要直接砍掉..

itsHenry35 commented 4 months ago

S3接口将来会产生bug

S3 是一个对象存储服务,它使用键值对的方式存储对象(文件) 在 S3 中,文件夹实际上是一个命名空间的概念,用于组织和管理对象

S3这块,建议重新评估,要不要直接砍掉..

回答:https://github.com/alist-org/alist/issues/6401#issuecomment-2105686911

itsHenry35 commented 2 months ago

Fixed in https://github.com/alist-org/alist/commit/2b74999703a7143346fc9f853c2c33e591be0a61