I found that Casdoor /api/upload-resource checks the "fullFilePath" query param and force convers its ext name to mime type, then parsed it as the"file_type" field. And app panics if mime type is not properly mapped. SoI'm thinking is this function, or the "file_type" field necessary?
I mean, casdoor acts as a redirector to provide files, right? So the file_type field means noting when getting files, because it contributes noting to the "Content-Type" response header.
For those files have extension name popular to users, its type is easily judged by fullpath field. And conversely, I think casdoor should allow application to upload resource without checks about extension name. /api/upload-resource api fails due to file extension name not polular enough for casdoor is..... unreasonable, I think.
What do you guys think of this?
