Skip to main content

Overview

Casdoor can store resources (files, images) in storage providers. Configure at least one storage provider and add it to your application, then users can upload and manage resources.

resource_addProvider.png

Uploading​

Users upload files or images to the storage configured for the application.

resource_upload.png

Global administrators can upload any file. For everyone else, including organization administrators, Casdoor accepts an upload only when it matches one of these rules:

UploadRule
Avatar or ID card image of a userThe 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 userThe 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 applicationOnly an organization administrator, for an application of their organization, as an .html file
Direct upload to the bucket of a storage providerOnly an organization administrator

Casdoor rejects any other upload with Unauthorized operation.

Deleting​

To remove a resource, open it and click Delete.

resource_delete.png