概述
Casdoor 可以把 资源(文件、图片)存放在 存储提供商 中。至少配置一个存储提供商并加到你的 应用 中,用户就可以上传和管理资源。

上传
用户把文件或图片上传到应用配置的 存储 中。

全局管理员可以上传任何文件。对于其他人(包括组织管理员),Casdoor 仅在上传符合以下规则之一时才接受上传:
| Upload | Rule |
|---|---|
| Avatar or ID card image of a user | The file is stored as <tag>/<organization>/<username>.<extension>, where <tag> is avatar or an ID card tag such as idCardFront, and is an image: .png, .jpg, .jpeg, .gif, .webp, .bmp, or .ico |
| Other files of a user | The file is stored under resource/<organization>/<username>/ and isn't active content that a browser runs: .html, .htm, .xhtml, .shtml, .svg, .svgz, .xml, .xsl, .js, .mjs, .php, .phtml, .jsp, .asp, .aspx, .swf, or .hta |
| Terms of use of an application | Only an organization administrator, for an application of their organization, as an .html file |
| Direct upload to the bucket of a storage provider | Only an organization administrator |
Casdoor 会以 Unauthorized operation 拒绝任何其他上传。
删除
要删除资源,打开它并点击 Delete。
