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:
Hexxa 2021-08-04 22:00:51 -05:00 committed by GitHub
parent aefaca98b3
commit 021e5090be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 580 additions and 267 deletions

View file

@ -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))))
}