feat(): refactor uploader (#68)
* chore(src): delete unused codes * fix(client/worker): refactor uploading part and fix issues * fix(ui/worker): rename fg worker file name * fix(ui/worker): cleanups * feat(ui/uploader): switch from file_uploader to chunk_uploader with tests * fix(ui/worker): clean up code
This commit is contained in:
parent
aefaca98b3
commit
021e5090be
13 changed files with 580 additions and 267 deletions
|
@ -125,22 +125,10 @@ func ErrResp(c *gin.Context, code int, err error) (int, interface{}) {
|
|||
|
||||
}
|
||||
|
||||
func FsPath(userID, relFilePath string) string {
|
||||
return filepath.Join(userID, FsDir, relFilePath)
|
||||
}
|
||||
|
||||
func HomePath(userID, relFilePath string) string {
|
||||
return filepath.Join(userID, relFilePath)
|
||||
}
|
||||
|
||||
func FsRootPath(userID, relFilePath string) string {
|
||||
return filepath.Join(userID, FsRootDir, relFilePath)
|
||||
}
|
||||
|
||||
func GetTmpPath(userID, relFilePath string) string {
|
||||
return filepath.Join(UploadDir, userID, fmt.Sprintf("%x", sha1.Sum([]byte(relFilePath))))
|
||||
}
|
||||
|
||||
func UploadPath(userID, relFilePath string) string {
|
||||
return filepath.Join(UploadFolder(userID), fmt.Sprintf("%x", sha1.Sum([]byte(relFilePath))))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue