整个包结构重构

This commit is contained in:
hoteas
2021-05-24 07:27:41 +08:00
parent 77ded19742
commit 9bc930750d
23 changed files with 245 additions and 202 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
package upload
import (
"code.hoteas.com/golang/hotime"
. "../../common"
"errors"
"io"
"mime/multipart"
@@ -50,7 +50,7 @@ func (this *Upload) UpFile(Request *http.Request, fieldName, savefilepath, saveP
}
}
}
filename := time.Unix(int64(t), 0).Format("2006-01-02-15-22-25") + hotime.ObjToStr(hotime.Rand(6))
filename := time.Unix(int64(t), 0).Format("2006-01-02-15-22-25") + ObjToStr(Rand(6))
filePath = path + "/" + filename + this.Path
} else {
filePath = savePath