Cloudreve
Cloudreve copied to clipboard
阿里云对象存储,不能删除文件
Describe the bug 阿里云不能删除文件
To Reproduce Steps to reproduce the behavior:
- 添加阿里对象存储策略如下

- 上传文件
- 删除文件不能删除 Expected behavior
Screenshots
(/home/runner/work/Cloudreve/Cloudreve/models/user.go:129)
[2021-06-15 21:58:18] [0.28ms] SELECT * FROM "users" WHERE "users"."deleted_at" IS NULL AND ((status = 0) AND ("users"."id" = 1)) ORDER BY "users"."id" ASC LIMIT 1
[1 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/user.go:129)
[2021-06-15 21:58:18] [0.18ms] SELECT * FROM "groups" WHERE "groups"."deleted_at" IS NULL AND (("id" IN (1))) ORDER BY "groups"."id" ASC
[1 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/file.go:77)
[2021-06-15 21:58:18] [0.16ms] SELECT * FROM "files" WHERE "files"."deleted_at" IS NULL AND ((id in (1) AND user_id = 1))
[1 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/file.go:140)
[2021-06-15 21:58:18] [0.10ms] SELECT * FROM "files" WHERE "files"."deleted_at" IS NULL AND ((source_name = 'uploads/1/2021-06-15-21-21-08-config' and policy_id = 2 and id != 1))
[0 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/file.go:171)
[2021-06-15 21:58:48] [0.07ms] DELETE FROM "files" WHERE (id in (NULL))
[0 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/share.go:196)
[2021-06-15 21:58:48] [0.07ms] UPDATE "shares" SET "deleted_at"='2021-06-15 21:58:48' WHERE "shares"."deleted_at" IS NULL AND ((source_id in (NULL) and is_dir = false))
[0 rows affected or returned ]
[GIN] 2021/06/15 - 21:58:48 | 200 | 30.00546749s | 127.0.0.1 | DELETE /api/v3/object
(/home/runner/work/Cloudreve/Cloudreve/models/user.go:129)
[2021-06-15 21:58:48] [0.30ms] SELECT * FROM "users" WHERE "users"."deleted_at" IS NULL AND ((status = 0) AND ("users"."id" = 1)) ORDER BY "users"."id" ASC LIMIT 1
[1 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/user.go:129)
[2021-06-15 21:58:48] [0.16ms] SELECT * FROM "groups" WHERE "groups"."deleted_at" IS NULL AND (("id" IN (1))) ORDER BY "groups"."id" ASC
[1 rows affected or returned ]
[GIN] 2021/06/15 - 21:58:48 | 200 | 835.49µs | 127.0.0.1 | GET /api/v3/user/storage
(/home/runner/work/Cloudreve/Cloudreve/models/user.go:129)
[2021-06-15 21:58:49] [0.28ms] SELECT * FROM "users" WHERE "users"."deleted_at" IS NULL AND ((status = 0) AND ("users"."id" = 1)) ORDER BY "users"."id" ASC LIMIT 1
[1 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/user.go:129)
[2021-06-15 21:58:49] [0.17ms] SELECT * FROM "groups" WHERE "groups"."deleted_at" IS NULL AND (("id" IN (1))) ORDER BY "groups"."id" ASC
[1 rows affected or returned ]
[GIN] 2021/06/15 - 21:58:49 | 200 | 798.286µs | 127.0.0.1 | GET /api/v3/user/storage
(/home/runner/work/Cloudreve/Cloudreve/models/user.go:129)
[2021-06-15 21:59:01] [0.25ms] SELECT * FROM "users" WHERE "users"."deleted_at" IS NULL AND ((status = 0) AND ("users"."id" = 1)) ORDER BY "users"."id" ASC LIMIT 1
[1 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/user.go:129)
[2021-06-15 21:59:01] [0.20ms] SELECT * FROM "groups" WHERE "groups"."deleted_at" IS NULL AND (("id" IN (1))) ORDER BY "groups"."id" ASC
[1 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/file.go:77)
[2021-06-15 21:59:01] [0.14ms] SELECT * FROM "files" WHERE "files"."deleted_at" IS NULL AND ((id in (1) AND user_id = 1))
[1 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/file.go:140)
[2021-06-15 21:59:01] [0.38ms] SELECT * FROM "files" WHERE "files"."deleted_at" IS NULL AND ((source_name = 'uploads/1/2021-06-15-21-21-08-config' and policy_id = 2 and id != 1))
[0 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/file.go:171)
[2021-06-15 21:59:31] [0.08ms] DELETE FROM "files" WHERE (id in (NULL))
[0 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/share.go:196)
[2021-06-15 21:59:31] [0.07ms] UPDATE "shares" SET "deleted_at"='2021-06-15 21:59:31' WHERE "shares"."deleted_at" IS NULL AND ((source_id in (NULL) and is_dir = false))
[0 rows affected or returned ]
[GIN] 2021/06/15 - 21:59:31 | 200 | 30.008252746s | 127.0.0.1 | DELETE /api/v3/object
(/home/runner/work/Cloudreve/Cloudreve/models/user.go:129)
[2021-06-15 21:59:31] [0.29ms] SELECT * FROM "users" WHERE "users"."deleted_at" IS NULL AND ((status = 0) AND ("users"."id" = 1)) ORDER BY "users"."id" ASC LIMIT 1
[1 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/user.go:129)
[2021-06-15 21:59:31] [0.19ms] SELECT * FROM "groups" WHERE "groups"."deleted_at" IS NULL AND (("id" IN (1))) ORDER BY "groups"."id" ASC
[1 rows affected or returned ]
[GIN] 2021/06/15 - 21:59:31 | 200 | 876.17µs | 127.0.0.1 | GET /api/v3/user/storage
(/home/runner/work/Cloudreve/Cloudreve/models/user.go:129)
[2021-06-15 21:59:31] [0.31ms] SELECT * FROM "users" WHERE "users"."deleted_at" IS NULL AND ((status = 0) AND ("users"."id" = 1)) ORDER BY "users"."id" ASC LIMIT 1
[1 rows affected or returned ]
(/home/runner/work/Cloudreve/Cloudreve/models/user.go:129)
[2021-06-15 21:59:31] [0.21ms] SELECT * FROM "groups" WHERE "groups"."deleted_at" IS NULL AND (("id" IN (1))) ORDER BY "groups"."id" ASC
[1 rows affected or returned ]
[GIN] 2021/06/15 - 21:59:31 | 200 | 927.505µs | 127.0.0.1 | GET /api/v3/user/storage
从日志及提供的信息中无法发现异常
我现在也是出现这个问题、只有阿里云OSS才会出现
七牛存储是没有问题的
Centos 7.0
oss 上的跨域也都配置了

遇到同样的问题
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.