liuxiaolong
2019-08-16 fe514a350280f532921b644daee041f7d684343c
fix filePath
1个文件已修改
16 ■■■■ 已修改文件
WeedFSClient.go 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WeedFSClient.go
@@ -9,7 +9,6 @@
    "log"
    "mime/multipart"
    "net/http"
    "strings"
    "time"
)
@@ -64,12 +63,13 @@
            return "", err
        }
        filePath := m["fileUrl"].(string)
        if strings.Contains(filePath,"/"){
            idx := strings.Index(filePath,"/")
            filePath = filePath[idx+1:]
            return filePath,nil
        } else {
            return "",errors.New("file upload error")
        }
        return filePath,nil
        //if strings.Contains(filePath,"/"){
        //    idx := strings.Index(filePath,"/")
        //    filePath = filePath[idx+1:]
        //    return filePath,nil
        //} else {
        //    return "",errors.New("file upload error")
        //}
    }
}