admin: add ability to add files from local storage
This commit is contained in:
parent
a3940abed8
commit
b41180c7b0
4 changed files with 76 additions and 42 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/hex"
|
||||
"fmt"
|
||||
"time"
|
||||
"path"
|
||||
)
|
||||
|
||||
type myTeamFile struct {
|
||||
|
|
@ -86,7 +87,7 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
|
|||
return nil, err
|
||||
} else {
|
||||
for _, f := range files {
|
||||
exercice.Files = append(exercice.Files, myTeamFile{f.Path, f.Name, hex.EncodeToString(f.Checksum), f.Size})
|
||||
exercice.Files = append(exercice.Files, myTeamFile{path.Join(FilesDir, f.Path), f.Name, hex.EncodeToString(f.Checksum), f.Size})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue