|
|
@ -31,6 +31,12 @@ func preview(c *gin.Context) {
|
|
|
|
fmt.Println(fullPath)
|
|
|
|
fmt.Println(fullPath)
|
|
|
|
_, p := filepath.Split(fullPath)
|
|
|
|
_, p := filepath.Split(fullPath)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO
|
|
|
|
|
|
|
|
//(1)保允许上传office系列的文件
|
|
|
|
|
|
|
|
//(2)在上传前判断文件是否已存在,存在了直接返回,不做重复工作,也可以支持强制刷新,需要添加参数
|
|
|
|
|
|
|
|
//(3)需要判断文件名是不是是标准的GUID形式,不是的不让上传
|
|
|
|
|
|
|
|
//(4)对于异常的明显提示信息
|
|
|
|
|
|
|
|
|
|
|
|
//判断是不是本地存在
|
|
|
|
//判断是不是本地存在
|
|
|
|
isExist, err := CommonUtil.PathExists(fullPath)
|
|
|
|
isExist, err := CommonUtil.PathExists(fullPath)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|