mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
Improve filter code.
This commit is contained in:
@ -120,11 +120,11 @@ func (c *ApiController) UploadResource() {
|
||||
fullFilePath := c.Input().Get("fullFilePath")
|
||||
|
||||
file, header, err := c.GetFile("file")
|
||||
defer file.Close()
|
||||
if err != nil {
|
||||
c.ResponseError(err.Error())
|
||||
return
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
filename := filepath.Base(fullFilePath)
|
||||
fileBuffer := bytes.NewBuffer(nil)
|
||||
|
Reference in New Issue
Block a user